This invention employs a scheme to allow an input video signal to undergo encoding, e.g., predictive encoding, DCT processing, quantization at fixed quantization step size and variable length encoding to generate first encoded data to determine (calculate) allocated code quantity every frame or every gop on the basis of data quantity every predetermined time, e.g., every frame or every gop of the first encoded data and total quantity of usable data to encode the input video signal every predetermined time on the basis of the allocated code quantity to generate second encoded data. Thus, variable rate encoding such that encoding rate changes every predetermined time is realized. As a result, even if pictures (frames) of complicated are successive, there is no possibility that quantization step size is caused to be large with respect to these pictures as in the conventional apparatus. Thus, uniform high picture quality can be obtained through the entirety. Further, since second encoded data obtained in a manner as described above has variable rate, in the case where such encoded data is recorded onto picture recording media, limited memory capacity can be effectively used, and recording time of picture recording media can be prolonged. In addition, picture data of high picture quality uniform over the entirety can be reproduced from the picture recording media.

Patent
   RE44091
Priority
Apr 09 1993
Filed
Feb 10 2009
Issued
Mar 19 2013
Expiry
Apr 11 2014
Assg.orig
Entity
unknown
1
21
EXPIRED
0. 28. A picture encoder to encode input video data, comprising:
a receiver to receive data representing difficulty by which a given group of pictures (gop) in the input video data and difficulty by which a plurality of gops that contain the given gop were encoded to first encoded video data;
a calculator to calculate a code quantity allocated for said given gop according to a difficulty ratio, which is the ratio of the difficulty of encoding said given gop to the difficulty of encoding the plurality of gops, so as to set the allocated code quantity for said given gop to be larger for complex pictures and smaller for simple pictures; and
a generator to generate second encoded data by encoding the input video data for each gop based on the code quantity allocated for that gop so that the data quantity for said each gop of the second encoded data is the code quantity allocated for said each gop.
0. 16. A picture encoding method for encoding input video data, comprising the steps of:
receiving from an encoding control circuit data representing difficulty by which a given group of pictures (gop) in the input video data and difficulty by which a plurality of gops that contains the given gop were encoded to first encoded video data;
calculating a code quantity allocated for said given gop according to a difficulty ratio, which is the ratio of the difficulty of encoding said given gop to the difficulty of encoding the plurality of gops, so as to set the allocated code quantity for said given gop to be larger for complex pictures and smaller for simple pictures; and
generating second encoded data by encoding the input video data for each gop based on the code quantity allocated for that gop so that the data quantity for said each gop of the second encoded data is the code quantity allocated for said each gop.
0. 35. A picture encoder to encode input video data, comprising:
a receiver to receive data representing difficulty by which a given picture in the input video data and difficulty by which a plurality of pictures that contain the given picture were encoded to first encoded video data, said difficulties being based on quantity of data of said first encoded video data;
a calculator to calculate a code quantity allocated for said given picture according to a difficulty ratio, which is the ratio of the difficulty of encoding said given picture to the difficulty of encoding the plurality of pictures, so as to set the allocated code quantity for said given picture to be larger for complex pictures and smaller for simple pictures; and
a generator to generate second encoded data by encoding the input video data for each picture based on the code quantity allocated for that picture so that the data quantity for said each picture of the second encoded data is the code quantity allocated for said each picture.
0. 23. A picture encoding method for encoding input video data, comprising the steps of:
receiving from an encoding control circuit data representing difficulty by which a given picture in the input video data and difficulty by which a plurality of pictures that contain the given picture were encoded to first encoded video data, said difficulties being based on quantity of data of said first encoded video data;
calculating a code quantity allocated for said given picture according to a difficulty ratio, which is the ratio of the difficulty of encoding said given picture to the difficulty of encoding the plurality of pictures, so as to set the allocated code quantity for said given picture to be larger for complex pictures and smaller for simple pictures; and
generating second encoded data by encoding the input video data for each picture based on the code quantity allocated for that picture so that the data quantity for said each picture of the second encoded data is the code quantity allocated for said each picture.
0. 1. An encoding method, comprising the steps of:
receiving an input video signal;
selectively encoding at least a portion of said input video signal by intra-frame encoding or predictive encoding to generate first encoded data, said predictive encoding including forward predictive encoding and backward predictive encoding;
transform encoding said first encoded data to generate first coefficient data;
quantizing said first coefficient data by a fixed step size;
variable length encoding said first quantized data to generate a first bit stream;
determining an encoding rate of said first bit stream every gop as a function of a data quantity of intra-frame and forward-predictive encoded pictures only in the gop;
selectively encoding said input video signal by intra-frame or predictive encoding to generate second encoded data;
transform encoding said second encoded data to generate second coefficient data;
setting a variable step size according to the encoding rate determined every gop;
quantizing said second coefficient data by said variable step size;
variable length encoding said second quantized data to generate a second bit stream; and
outputting said second bit stream.
0. 2. An encoding apparatus, comprising:
means for receiving an input video signal;
means for selectively encoding at least a portion of said input video signal by intra-frame encoding or predictive encoding to generate first encoded data, said predictive encoding including forward predictive encoding and backward predictive encoding;
means for transform encoding said first encoded data to generate first coefficient data;
means for quantizing said first coefficient data by a fixed step size;
means for variable length encoding said first quantized data to generate a first bit stream;
means for determining an encoding rate of said first bit stream every gop as a function of a data quantity of intra-frame and forward-predictive encoded pictures only in the gop;
means for selectively encoding said input video signal by intra-frame or predictive encoding to generate second encoded data;
means for transform encoding said second encoded data to generate second coefficient data;
means for setting a variable step size according to the encoding rate determined every gop;
means for quantizing said second coefficient data by said variable step size;
means for variable length encoding said second quantized data to generate a second bit stream; and
means for outputting said second bit stream.
0. 3. A recording medium on which there is recorded a second bit stream obtained by:
receiving an input video signal;
selectively encoding at least a portion of said input video signal by intra-frame encoding or predictive encoding to generate first encoded data, said predictive encoding including forward predictive encoding and backward predictive encoding;
transform encoding said first encoded data to generate first coefficient data;
quantizing said first coefficient data by a fixed step size;
variable length encoding said first quantized data to generate a first bit stream;
determining an encoding rate of said first bit stream every gop as a function of a data quantity of intra-frame and forward-predictive encoded pictures only in the gop;
selectively encoding said input video signal by infra-frame or predictive encoding to generate second encoded data;
transform encoding said second encoded data to generate second coefficient data;
setting a variable step size according to the encoded data rate determined every gop;
quantizing said second coefficient data by said variable step size;
variable length encoding said second quantized data to generate a second bit stream; and
recording said second bit stream on said recording medium.
0. 4. An encoding method, comprising the steps of:
receiving an input video signal;
selectively encoding at least a portion of said input video signal by inter-frame encoding or predictive encoding to generate first encoded data, said predictive encoding including forward predictive encoding and backward predictive encoding;
transform encoding said first encoded data to generate first coefficient data;
quantizing said first coefficient data by a fixed step size;
variable length encoding said first quantized data to generate a first bit stream;
determining a difficulty of encoding said first bit stream every gop based on inter-frame and forward-predictive encoded pictures only in the gop;
calculating an encoding rate from said difficulty of encoding determined every gop;
selectively encoding said input video signal by intra-frame or predictive encoding to generate second encoded data;
transform encoding said second encoded data to generate second coefficient data;
quantizing the second coefficient data by a step size set according to said calculated encoding rate;
variable length encoding said second quantized data to generate a second bit stream; and
outputting said second bit stream.
0. 5. An encoding apparatus, comprising:
means for receiving an input video signal;
means for selectively encoding at least a portion of said input video signal by intra-frame encoding or predictive encoding to generate first encoded data, said predictive encoding including forward predictive encoding and backward predictive encoding;
means for transform encoding said first encoded data to generate first coefficient data;
means for quantizing said first coefficient data by a fixed step size;
means for variable length encoding said first quantized data to generate a first bit stream;
means for determining a difficulty of encoding said first bit stream every gop based on intra-frame and forward-predictive encoded pictures only in the gop;
means for calculating an encoding rate from said difficulty of encoding determined every gop;
means for selectively encoding said input video signal by intra-frame or predictive encoding to generate second encoded data;
means for transform encoding said second encoded data to generate second coefficient data;
means for quantizing the second coefficient data by a step size set according to said calculated encoding rate;
means for variable length encoding said second quantized data to generate a second bit stream; and
means for outputting said second bit stream.
0. 6. A recording medium on which there is recorded a second bit stream obtained by:
receiving an input video signal;
selectively encoding at least a portion of said input video signal by intra-frame encoding or predictive encoding to generate first encoded data, said predictive encoding including forward predictive encoding and backward predictive encoding;
transform encoding said first encoded data to generate first coefficient data;
quantizing said first coefficient data by a fixed step size;
variable length encoding said first quantized data to generate a first bit stream;
determining a difficulty of encoding said first bit stream every gop based on intra-frame and forward-predictive encoded pictures only in the gop;
calculating an encoding rate from said difficulty of encoding determined every gop;
selectively encoding said input video signal by intra-frame or predictive encoding to generate second encoded data;
transform encoding said second encoded data to generate second coefficient data;
quantizing the second coefficient data by a step size set according to said calculated encoding rate;
variable length encoding said second quantized data to generate a second bit stream; and
recording said second bit stream on said recording medium.
0. 7. An encoding method, comprising the steps of:
receiving an input video signal;
selectively encoding at least a portion of said input video signal by intra-frame or predictive encoding to generate first encoded data representing intra-frame or predictive encoded pictures, respectively;
transform encoding said first encoded data to generate first coefficient data;
quantizing said first coefficient data by a fixed step size;
variable length encoding said first quantized data to generate a first bit stream;
counting a data quantity of said first bit stream every predetermined time to indicate a difficulty of encoding;
determining said difficulty of encoding said first bit stream based on intra-frame and forward-predictive encoded pictures only;
calculating an allocated code quantity for each unit of predetermined time as a function of said difficulty of encoding so that said allocated code quantity is set to be larger for complex pictures and smaller for simple pictures;
selectively encoding said input video signal by intra-frame or predictive encoding to generate second encoded data;
transform encoding said second encoded data to generate second coefficient data;
quantizing said second coefficient data at a step size set in response to said allocated code quantity;
variable length encoding said second quantized data to generate a second bit stream; and
outputting said second bit stream.
0. 8. A method according to claim 7, wherein the fixed quantization step size equals one.
0. 9. A method according to claim 7, further comprising the step of storing said second bit stream in a buffer before it is output, wherein said quantization step size is further based on a quantity of said second bit stream stored in said buffer.
0. 10. A method according to claim 7, wherein said predetermined time is a frame.
0. 11. An encoding apparatus, comprising:
means for receiving an input video signal;
means for selectively encoding at least a portion of said input video signal by intra-frame or predictive encoding to generate first encoded data representing intra-frame or predictive encoded pictures, respectively;
means for transform encoding said first encoded data to generate first coefficient data;
means for quantizing said first coefficient data by a fixed step size;
means for variable length encoding said first quantized data to generate a first bit stream;
means for counting a data quantity of said first bit stream every predetermined time to indicate a difficulty of encoding;
means for determining said difficulty of encoding said first bit stream based on intra-frame and forward-predictive encoded pictures only;
means for calculating an allocated code quantity for each unit of predetermined time as a function of said difficulty of encoding so that said allocated code quantity is set to be larger for complicated pictures and smaller for simple pictures;
means for selectively encoding said input video signal by intra-frame or predictive encoding to generate second encoded data;
means for transform encoding said second encoded data to generate second coefficient data;
means for quantizing said second coefficient data at a step size set in response to said allocated code quantity;
means for variable length encoding said second quantized data to generate a second bit stream; and
means for outputting said second bit stream.
0. 12. An apparatus according to claim 11, wherein the fixed quantization step size equals one.
0. 13. An apparatus according to claim 11, further comprising a buffer for storing said second bit stream before it is output, wherein said quantization step size is further based on a quantity of said second bit stream stored in said buffer.
0. 14. An apparatus according to claim 11, wherein said predetermined time is a frame.
0. 15. A recording medium on which there is recorded a second bit stream obtained by:
receiving an input video signal;
selectively encoding at least a portion of said input video signal by intra-frame or predictive encoding to generate first encoded data representing intra-frame or predictive encoded pictures, respectively;
transform encoding said first encoded data to generate first coefficient data;
quantizing said first coefficient data by a fixed step size;
variable length encoding said first quantized data to generate a first bit stream;
counting a data quantity of said first bit stream every predetermined time to indicate a difficulty of encoding;
determining said difficulty of encoding said first bit stream based on intra-frame and forward-predictive encoded pictures only;
calculating an allocated code quantity for each unit of predetermined time as a function of said difficulty of encoding so that said allocated code quantity is set to be larger for complicated pictures and smaller for simple pictures;
selectively encoding said input video signal by intra-frame or predictive encoding to generate second encoded data;
transform encoding said second encoded data to generate second coefficient data;
quantizing said second coefficient data at a step size set in response to said allocated code quantity;
variable length encoding said second quantized data to generate a second bit steam; and
recording said second bit stream on said recording medium.
0. 17. The picture encoding method according to claim 16, wherein the code quantity allocated for each gop is obtained by multiplying total quantity of usable data for said plurality of gops of the encoded video data by said difficulty ratio.
0. 18. The picture encoding method according to claim 17, wherein the code quantity allocated for each gop is obtained by the following formula
GOPb j = B × GOPd j / j = 0 M - 1 GOPd j
where, M denotes the number of the gops in said plurality of gops, j denotes an integer from 1 to M−1, GOPbj denotes the code quantity allocated to the j-th gop, B denotes the total quantity of usable data for the plurality of gops determined by a transmission path bit rate over which said encoded video data is transmitted, and GOPdj denotes the difficulty of encoding the j-th gop, respectively.
0. 19. The picture encoding method according to claim 16, wherein the difficulty of encoding each gop is determined by the data quantity of the first encoded data as a function of the picture type of each picture in said each gop.
0. 20. The picture encoding method according to claim 19, wherein the data quantity of intra-frame encoded pictures and the data quantity of forward-predictive intra-frame encoded pictures are obtained for each gop, the number of the intra-frame encoded pictures and the number of the forward-predictive intra-frame encoded pictures are obtained for each gop, and the difficulty of encoding each gop is calculated from the combination of the data quantity of the intra-frame encoded pictures and the forward-predictive intra-frame encoded pictures with the number of the intra-frame encoded pictures and the forward-predictive intra-frame encoded pictures.
0. 21. The picture encoding method according to claim 20, wherein the difficulty of encoding each gop is based on the following formula

GOPdj=bitIj+N×bitPj
where GOPdj denotes the difficulty of encoding the j-th gop, bitIj denotes the number of intra-frame encoded pictures of the j-th gop, N denotes the number of intra-frame encoded pictures, and bitPj denotes the data quantity of the intra-frame encoded pictures of the j-th gop, respectively.
0. 22. The picture encoding method according to claim 21 wherein the second encoded data is generated according to the allocated code quantity using a quantization step size based on the calculated code quantity allocated for a respective gop.
0. 24. The picture encoding method according to claim 23, wherein the code quantity allocated for each picture is proportionally allocated from the total quantity of usable data for said plurality of pictures over a predetermined time in accordance with the difficulty ratio.
0. 25. The picture encoding method according to claim 24, wherein the allocated code quantity for each picture is determined by the following formula
b i = B × d i / i = 0 N - 1 d i
where, N denotes the number of pictures in the plurality of pictures, i denotes an integer of 1 to N−1, bi denotes the allocated code quantity for the i-th picture, B denotes the total quantity of usable data in the plurality of pictures, and di denotes the difficulty of encoding the i-th picture, respectively.
0. 26. The picture encoding method according to claim 25, wherein the second encoded data is generated by quantization with a quantization step size for each picture based on the code quantity allocated for said each picture.
0. 27. The picture encoding method according to claim 26, wherein each picture is divided into macro blocks for encoding, and the quantization step size is set for each macro block, with the quantization step size being set to a larger value so that the data quantity of the second encoded data is smaller when the allocated code quantity of the macro block is smaller than the data quantity of the corresponding macro block of the first encoded data, and set to a smaller value so that the data quantity of the second encoded data is larger when the allocated code quantity of the macro block is larger than the data quantity of the corresponding macro block of the first encoded data.
0. 29. The picture encoder according to claim 28, wherein the code quantity allocated for each gop is obtained by multiplying total quantity of usable data for said plurality of gops of the encoded video data by said difficulty ratio.
0. 30. The picture encoder according to claim 29, wherein the code quantity allocated for each gop is obtained by the following formula
GOPb j = B × GOPd j / j = 0 M - 1 GOPd j
where, M denotes the number of the gops in said plurality of gops, j denotes an integer from 1 to M−1, GOPbj denotes the code quantity allocated to the j-th gop, B denotes the quantity of usable data for the plurality of gops determined by a transmission path bit rate over which said encoded video data is transmitted and GOPdj denotes the difficulty of encoding the j-th gop, respectively.
0. 31. The picture encoder according to claim 28, wherein the difficulty of encoding each gop is determined by the data quantity of the first encoded data as a function of the picture type of each picture in said each gop.
0. 32. The picture encoder according to claim 31, wherein the data quantity of intra-frame encoded pictures and the data quantity of forward-predictive intra-frame encoded pictures are obtained for each gop, the number of the intra-frame encoded pictures and the number of the forward-predictive intra-frame encoded pictures are obtained for each gop, and the difficulty of encoding each gop is calculated from the combination of the data quantity of the intra-frame encoded pictures and the forward-predictive intra-frame encoded pictures with the number of the intra-frame encoded pictures and the forward-predictive intra-frame encoded pictures.
0. 33. The picture encoder according to claim 32, wherein the difficulty of encoding each gop is based on the following formula

GOPdj=bitIj+N×bitPj
where GOPdj denotes a difficulty of encoding the j-th gop, bitIj denotes the number of intra-frame encoded pictures of the j-th gop, N denotes the number of intra-frame encoded pictures, and bitPj denotes the data quantity of intra-frame encoded pictures of the j-th gop, respectively.
0. 34. The picture encoder according to claim 33 wherein the second encoded data is generated according to the allocated code quantity using a quantization step size based on the calculated code quantity allocated for a respective gop.
0. 36. The picture encoder according to claim 35, wherein the code quantity allocated for each picture is proportionally allocated from the total quantity of usable data for said plurality of pictures over a predetermined time in accordance with the difficulty ratio.
0. 37. The picture encoder according to claim 36, wherein the allocated code quantity for each picture is determined by the following formula
b i = B × d i / i = 0 N - 1 d i
where, N denotes the number of pictures in the plurality of pictures, i denotes an integer of 1 to N−1, bi denotes the allocated code quantity for the i-th picture, B denotes the total quantity of usable data in the plurality of pictures, and di denotes the difficulty of encoding the i-th picture, respectively.
0. 38. The picture encoder according to claim 37, wherein the second encoded data is generated by quantization with a quantization step size for each picture based on the code quantity allocated for said each picture.
0. 39. The picture encoder according to claim 38, wherein each picture is divided into macro blocks for encoding, and the quantization step size is set for each macro block, with the quantization step size being set to a larger value so that the data quantity of the second encoded data is smaller when the allocated code quantity of the macro block is smaller than the data quantity of the corresponding macro block of the first encoded data, and set to a smaller value so that the data quantity of the second encoded data is larger when the allocated code quantity of macro block is larger than the data quantity of the corresponding macro block of the first encoded data.

This application is a continuation of application Ser. No. 08/351,262, filed as PCT/JP94/00610 Apr. 11, 1994 published as WO94/24822 Oct. 27, 1994, now abandoned.

This invention relates to a picture encoding method, a picture encoding apparatus and a picture recording medium, and more particularly to a picture encoding method, a picture encoding apparatus and a picture recording medium which are used in a system for implementing encoding for storage to a video signal of moving picture to record the coded signal onto a picture recording medium such as an optical disc, a magnetic disc, or a magnetic tape, etc., or a system for transmitting a video signal of moving picture through a transmission path.

B = i = 0 N - 1 b i = i = 0 N - 1 a × d i = a × i = 0 N - 1 d i ( 2 )

Accordingly, constant a can be calculated by the following formula (3). When substitution of this constant a into the formula (1) is made, allocated code quantity bi with respect to the i-th frame can be calculated by the following formula (4).

a = B i = 0 N - 1 d i ( 3 )

b i = d i × ( B i = 0 N - 1 d i ) ( 4 )

Thus, bit rate calculating circuit 32 increases allocated code quantity bi with respect to frame of picture of complicated pattern, for example, and decreases allocated code quantity bi with respect to frame of simple pattern.

On the other hand, inverse quantizing circuit 18 inverse-quantizes quantized data delivered from quantizing circuit 16 at quantization step size caused to be set to 1 to reproduce coefficient data (quantization distortion is added) corresponding to output of DCT circuit 15 to deliver that coefficient data to IDCT circuit 20.

The IDCT circuit 20 implements IDCT processing to coefficient data to reproduce input picture data corresponding to output of predictive encoding circuit 14 in the intra-frame encoding mode, and reproduces difference data in the forward/backward/bidirectionally predictive mode, thus to deliver reproduced data to adding circuit 21.

The adding circuit 21 is supplied, when predictive encoding mode is forward/backward/bidirectionally predictive mode, with motion-compensated predictive picture data from motion compensating circuit 23. The adding circuit 21 adds this predictive picture data and difference data delivered from IDCT circuit 20 to thereby reproduce picture data corresponding to input picture data.

The picture data reproduced in this way is stored into frame memory 22 as predictive picture data. Namely, inverse quantizing circuit 18˜adding circuit 21 constitute a local decoding circuit to locally decode quantized data outputted from quantizing circuit 18 on the basis of predictive mode to write decoded picture obtained into frame memory 22 as forward predictive picture or backward predictive picture. Frame memory 22 is composed of a plurality of frame memories. Bank switching of frame memory is carried out. In dependency upon picture to be encoded, e.g., single frame is outputted as forward predictive picture data, or is outputted as backward predictive picture data. Further, in the case of forward/backward/bidirectional prediction, forward predictive picture data and backward predictive picture data are, e.g., averaged and the averaged data is outputted. These predictive picture data are entirely the same picture data as picture data reproduced by picture decoding apparatus which will be described later. Picture to be processed next is caused to undergo forward/backward/bidirectionally encoding on the basis of this predictive picture.

The operation of second encoding circuit 40 will now be described. It is to be noted that since circuits except for quantization scale setting circuit 33, delay element 43, quantizing circuit 48, and transmitting buffer 49 constituting second encoding circuit 40 perform the same operations as those of circuits constituting the above-described first encoding circuit 10, their explanation is omitted.

Delay element 43 delays input picture data, e.g., by time until encoding control signal is outputted from encoding control circuit 30. Then, at predictive encoding circuit 44 and DCT circuit 45, predictive encoding processing and DCT processing which are in accordance with predictive mode delivered from intra-frame/forward/backward/bidirectionally predictive judging circuit 13 are implemented to the delayed input picture data. Thus, coefficient data is generated.

Quantization scale setting circuit 33 determines (calculates) allocated code quantity every macro block (e.g., value obtained by dividing allocated code quantity every frame by the number of macro blocks in one frame) from delivered allocated code quantity every frame to carry out comparison between code quantity generated in a macro block which is detected from buffer feedback from transmitting buffer 49 and allocated code quantity every macro block. The quantization scale setting circuit 33 operates as follows so as to allow encoding bit rates of respective frames to become close to set mean encoding bit rate every frame time. Namely, in the case where code quantity generated in corresponding macro block is greater than allocated code quantity every macro block, the circuit 33 sets quantization step size of next macro block to a greater value in order to suppress code quantity generated by the next macro block. In contrast, in the case where code quantity generated in corresponding macro block is smaller than allocated code quantity every macro block, the circuit 33 sets quantization step size of next macro block to a smaller value so as to increase code quantity generated. It should be noted that quantization scale setting circuit 33 is operative so that in the case where buffer feedback from transmitting buffer 49 indicates that transmitting buffer 49 is in a state close to overflow state, it allows quantization step size to be larger to suppress overflow irrespective of comparison result between the allocated code quantity and code quantity generated, while in the case where buffer feedback from the transmitting buffer 49 indicates that transmitting buffer 49 is in a state close to underflow state, it allows quantization step to be smaller to suppress underflow irrespective of comparison result between the allocated code quantity and code quantity generated. While it has been described that comparison between code quantity generated and allocated code quantity is made every macro block to switch quantization step size every macro block, such switch may be carried out every slice. While it has been described that code quantity generated is detected from storage quantity of transmitting buffer 49, it may be directly obtained from output of variable length encoding circuit 47. The quantization scale setting circuit 33 delivers quantization step size set in this way to quantizing circuit 46.

The quantizing circuit 46 quantizes coefficient data delivered from DCT circuit 45 by quantization step size delivered from the above-described quantization scale setting circuit 33 to generate quantized data.

VLC circuit 47 allows quantized data delivered from quantizing circuit 46 to undergo variable length encoding along with quantization step size from quantization scale setting circuit 33, predictive mode from intra-frame/forward/backward/bidirectionally predictive judging circuit 13, and motion vector from motion vector detecting circuit 11, etc. to deliver variable length encoded data obtained to transmitting buffer memory 49 as a second bit stream.

Namely, in this picture encoding apparatus, as shown in FIG. 3, for example when picture data is inputted through delay element 43 at step ST1, quantization scale setting circuit 33 reads in, from encoding control circuit 30, allocated code quantity with respect to frame to be currently encoded at step ST2, then, the processing operation proceeds to step ST3.

At step ST3, predictive encoding circuit 44˜VLC circuit 47 implement predictive encoding processing and DCT processing to picture data, and quantizes coefficient data by quantization step size based on allocated code quantity thereafter to allow it to undergo variable length encoding. Then, the processing operation proceeds to step ST4.

At the step ST4, whether or not encoding processing has been completed with respect to all frames (sequence) to which, e.g., the same picture size or the same transfer rate is applied is judged. If so, the processing is completed. In contrast, if not so, the processing operation returns to step ST1. Thus, variable rate encoding such that encoding rate changes in frame units is realized. Accordingly, even if pictures (frames) of complicated pattern are successive, there is no possibility that quantization step size is caused to be large with respect to these pictures as in the conventional apparatus. Thus, uniform high picture quality can be obtained through the entirety.

The transmitting buffer memory 49 temporarily stores variable length encoded data thereafter to read out it at a fixed bit rate to thereby smooth the variable length encoded data to output it as bit stream. The bit stream which has been outputted from transmitting buffer 49 is multiplexed along with, e.g., encoded audio signal, synchronizing signal, etc. Further, code for error correction is added thereto, and a predetermined modulation suitable for transmission or recording is applied thereto. Thereafter, bit stream thus processed is transmitted to picture decoding apparatus through, e.g., transmission path, or is recorded onto picture recording medium 55 comprised of optical disc, magnetic disc or magnetic tape, etc. as shown in the FIG. 1 mentioned above. Namely, since, in the second encoding circuit 40, there is carried out a variable rate encoding such that, e.g., allocated code quantity bi is increased in advance with respect to complicated picture and allocated code quantity bi is decreased with respect to simple picture, there is no necessity of applying a fixed rate of high rate through the entirety in order to avoid extreme deterioration of picture quality with respect to pictures of complicated pattern as in the case of conventional apparatus. Thus, recording time of picture recording medium 55 can be prolonged.

On the other hand, inverse quantizing circuit 48 inverse-quantizes quantized data delivered from quantizing circuit 46 by quantization step size used in the above-described quantizing circuit 46 to reproduce coefficient data (quantization distortion is added) corresponding to output of DCT circuit 45 to deliver this coefficient data to IDCT circuit 50. Namely, inverse quantizing circuit 48˜adding circuit 51 constituting a local decoding circuit locally decode quantized data outputted from quantizing circuit 46 to write decoded picture obtained into frame memory 52 as forward predictive picture or backward predictive picture. Picture data stored in frame memory 52 is used as predictive picture for picture to be processed next.

Meanwhile, while, in the above-described embodiment, allocated code quantity per predetermined time, i.e., mean encoding rate per predetermined time is obtained every frame with frame being used as predetermined time, this invention is not limited to such an implementation. For example, GOP (Group of Pictures in so called MPEG (Moving Picture Expert Group) may be used as a predetermined time. It should be noted that the above-described MPEG is general name of the moving picture encoding system being studied in WG (Working Group) 11 of SC (Sub Committee) 29 in JTC (Joint Technical Committee) of so called ISO (International Standardization Organization) and IEC (International Electrotechnical Committee).

Namely, GOP in MPEG consists of at least one so called I picture, and a plurality of P pictures or B pictures (non-I picture). In a more practical sense, assuming that GOP consists of a single I picture, four P pictures having a period of 3 pictures, and ten B pictures, encoding control circuit 30 determines allocated code quantity every GOP. Here, I picture is picture to be subjected to intra-field or intra-frame encoding. P picture is picture which can be predicted only from forward direction, and is subjected to interfield or intra-frame encoding. B picture is picture which can be predicted from forward direction, from back ward direction and from both directions and is subjected to interfield or intra-frame encoding.

When it is assumed, as shown in FIG. 5, for example, that successive arbitrary two pictures within GOP having the number of pictures constituting GOP as period are I picture and P picture, and quantization step size is, e.g., 1, the first encoding circuit 10 implements predictive encoding processing, DCT processing, and variable length encoding processing to picture data of these I and P pictures to generate variable length encoded data to deliver the variable length encoded data to encoding control circuit 30. The reason why two pictures are used as I picture, P picture is to examine complexity of pattern and correlation between frames. From code quantity generated of I picture, it is possible to recognize complexity of pattern. From code quantity generated of P picture, it is possible to recognize correlation between frames. Since successive plural frames have similar pictorial images in general, it is possible to recognize tendency of pattern of GOP even from extracted two pictures.

Encoding control circuit 30 counts (calculates), every GOP, data quantity of I picture bit Ij and data quantity of P picture bit Pj, and determines, every GOP, difficulty (code quantity generated GOP dj (j=0, 1, 2 . . . ) on the basis of these data quantities bit Ij, bit Pj and the number N of P pictures constituting GOP as indicated by the following formula (5), for example.
GOPdj=bitIj+N×bitPj  (5)

The encoding control circuit 30 determines allocated code quantity allocated every GOP on the basis of difficulty (code quantity generated) GOP dj every GOP and total quantity of usable data, and delivers this allocated code quantity to second encoding circuit 40.

In actual terms, when the number of GOPs is assumed to be M, total quantity of usable data is assumed to be B, allocated code quantity with respect to the j-th GOP is GOP bj, and this allocated code quantity GOP bj is caused to be in proportion to difficulty as indicated by the following formula (6), data total quantity B is determined by adding allocated code quantities GOP bj of all GOPs as indicated by the following formula (7). In the formula (6), a is constant.

GOPb j = a × GOPd j ( 6 ) B = j = 0 M - 1 GOPb j

Accordingly, constant a can be determined By the following formula (8). Substituting this constant a into the formula (6),

B = j = 0 m - 1 a × GOPd j = a × j = 0 m - 1 GOPd j ( 7 )
allocated code quantity GOPbj with respect to the j-th GOP can be determined by the following formula (9).

a = B j = 0 M - 1 GOPd j ( 8 )

GOPb j = GOPd j × ( B j = 0 M - 1 GOPd j ) ( 9 )

Thus, encoding control circuit 30 increases allocated code quantity GOP bj with respect to, e.g., GOP in which pictures of complicated pattern are included or having low correlation between frames, and decreases allocated code quantity GOP bj with respect to GOP in which pictures of simple pattern are included or having high correlation between frames.

When second encoding circuit 40 is supplied with picture data through delay element 43 at step ST1, as shown in FIG. 6, for example, it judges, at step ST2, whether or not picture data being inputted is the leading picture of GOP. If so, the processing operation proceeds to step ST3. If not so, the processing operation proceeds to step ST4.

At step ST3, second encoding circuit 40 reads in allocated code quantity with respect to GOP currently subjected to encoding from encoding control circuit 30. Then, the processing operation proceeds to step ST4.

At the step ST4, second encoding circuit 40 implements predictive encoding processing and DCT processing, and quantizes coefficient data by quantization step size based on allocated code quantity thereafter to allow it to undergo variable length encoding. Then, the processing operation proceeds to step ST5.

Here, quantization scale setting circuit 33 sets allocated code quantity every frame from delivered allocated code quantity every GOP by taking into consideration picture type (I picture, P picture, B picture) in actual encoding, e.g., picture type shown in FIG. 4. In a more practical sense, allocated code quantity with respect to I picture is increased, allocated code quantity with respect to B picture is decreased, and allocated code quantity with respect to P picture is caused to be intermediate therebetween.

At the subsequent step ST5, whether or not encoding processing has been completed with respect to all frames (sequence) to which the same picture size or the same transfer rate is applied is judged. If so, the processing is completed. In contrast, if not so, the processing operation returns to step ST1. Thus, a variable rate encoding such that encoding rate changes every GOP is realized. Even if pictures (frames) of complicated pattern are successive. there is no possibility that quantization step size is caused to be large with respect to these pictures as in the conventional apparatus. As a result, it is possible to obtain uniform high picture quality over the entirety. Further, since allocated code quantity every GOP is determined on the basis of two pictures in this embodiment, higher speed processing can be carried out as compared to the above-described embodiment. It is to be noted that it is a matter of course to determine allocated code quantities of respective GOPs on the basis of data quantities of all pictures within GOP.

It should be noted that this invention is not limited to the above-described embodiments. While, e.g., transform coding employs DCT in the above-described embodiments, so called Strato transform, Haar transform or Wavelet transform, etc. may be employed.

As is clear from the foregoing description, this invention employs a scheme to allow an input video signal to undergo encoding, e.g., predictive encoding, DCT processing, quantization at fixed quantization step size and variable length encoding to generate first encoded data to determine (calculate) allocated code quantity every frame or every GOP on the basis of data quantity every predetermined time, e.g., every frame or every GOP of the first encoded data and total quantity of usable data to encode the input video signal every predetermined time on the basis of the allocated code quantity to generate second encoded data. Thus, variable rate encoding such that encoding rate changes every predetermined time is realized. As a result, even if pictures (frames) of complicated are successive, there is no possibility that quantization step size is caused to be large with respect to these pictures as in the conventional apparatus. Thus, uniform high picture quality can be obtained over the entirety.

Further, since second encoded data obtained in a manner as described above has variable rate, in the case where such encoded data is recorded onto picture recording media, limited memory capacity can be effectively used, and recording time of picture recording media can be prolonged. In addition, picture data of high picture quality uniform through the entirety can be reproduced from the picture recording media.

Oda, Tsuyoshi

Patent Priority Assignee Title
9716885, Jul 31 2013 Empire Technology Development LLC Encoding scheme
Patent Priority Assignee Title
5038209, Sep 27 1990 AT&T Bell Laboratories; American Telephone and Telegraph Company Adaptive buffer/quantizer control for transform video coders
5073820, Oct 31 1989 Olympus Optical Co., Ltd. Image data coding apparatus and coding method
5136377, Dec 11 1990 MULTIMEDIA PATENT TRUST C O Adaptive non-linear quantizer
5144424, Oct 15 1991 THOMSON CONSUMER ELECTRONICS, INC A CORPORATION OF DE Apparatus for video data quantization control
5231484, Nov 08 1991 International Business Machines Corporation; INTERNATIONAL BUSINESS MACHINES CORPORATION A CORPORATION OF NEW YORK Motion video compression system with adaptive bit allocation and quantization
5287200, May 14 1990 Eastman Kodak Company Block adaptive linear predictive coding with multi-dimensional adaptive gain and bias
5379355, Aug 24 1992 Ricoh Company Ltd. Data encoding using one or more adaptive decision trees
5396567, Nov 16 1990 Siemens Aktiengesellschaft Process for adaptive quantization for the purpose of data reduction in the transmission of digital images
5404168, Feb 25 1992 Sony Corporation Method and apparatus for encoding an image signal using a multi-stage quantizing number determiner
5410351, Jul 31 1991 Sony Corporation Video signal transmission system and method
5426463, Feb 22 1993 RCA Thomson Licensing Corporation Apparatus for controlling quantizing in a video signal compressor
5434623, Dec 20 1991 Ampex Corporation Method and apparatus for image data compression using combined luminance/chrominance coding
5461422, May 23 1994 Industrial Technology Research Institute Quantizer with automatic pre-threshold
5719986, May 02 1995 Sony Corporation Video signal encoding method
EP475251,
EP493130,
EP5009576,
EP509576,
EP520789,
EP535960,
EP613306,
/
Executed onAssignorAssigneeConveyanceFrameReelDoc
Feb 10 2009Sony Corporation(assignment on the face of the patent)
Date Maintenance Fee Events


Date Maintenance Schedule
Mar 19 20164 years fee payment window open
Sep 19 20166 months grace period start (w surcharge)
Mar 19 2017patent expiry (for year 4)
Mar 19 20192 years to revive unintentionally abandoned end. (for year 4)
Mar 19 20208 years fee payment window open
Sep 19 20206 months grace period start (w surcharge)
Mar 19 2021patent expiry (for year 8)
Mar 19 20232 years to revive unintentionally abandoned end. (for year 8)
Mar 19 202412 years fee payment window open
Sep 19 20246 months grace period start (w surcharge)
Mar 19 2025patent expiry (for year 12)
Mar 19 20272 years to revive unintentionally abandoned end. (for year 12)