Picture encoding method, picture encoding apparatus and picture recording medium
Abstract
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.
Claims
exact text as granted — not AI-modified1. 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.
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.
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.
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.
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.
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.
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.
8. A method according to claim 7 , wherein the fixed quantization step size equals one.
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.
10. A method according to claim 7 , wherein said predetermined time is a frame.
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.
12. An apparatus according to claim 11 , wherein the fixed quantization step size equals one.
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.
14. An apparatus according to claim 11 , wherein said predetermined time is a frame.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.