Apparatus and methods for transcoder-based adaptive quantization
First Claim
1. A method for determining an optimal re-encode quantization parameter, comprising:
- receiving a decoded quantization parameter, Q1, of a bitstream portion;
receiving a re-encode quantization parameter, Q2, of the bitstream portion;
comparing Q1 and Q2; and
selecting Q2 as the optimal re-encode quantization parameter if Q2 is greater than Q1, and otherwise selecting Q1 as the optimal re-encode quantization parameter.
4 Assignments
0 Petitions
Accused Products
Abstract
The present invention provides a transcoding architecture and a consumer set-top box with storage capability that is based on the transcoding architecture and capable of operating efficiently in an all-digital environment. In a preferred embodiment, a digital-VIDEO DEVICE employs an MPEG-2 compliant transcoder that includes a simplified cascaded decoder and encoder, and is capable of performing determinable bitrate re-encoding without conducting motion estimation. During recording, the decoder receives and processes a compressed source bitstream, producing a decoded bitstream that includes reconstructed video and preserved motion vectors. The encoder “re-encodes” the decoded bitstream using the preserved motion vectors and performs any applicable bitrate modifications. The re-encoded bitstream is then stored.
167 Citations
25 Claims
-
1. A method for determining an optimal re-encode quantization parameter, comprising:
-
receiving a decoded quantization parameter, Q1, of a bitstream portion;
receiving a re-encode quantization parameter, Q2, of the bitstream portion;
comparing Q1 and Q2; and
selecting Q2 as the optimal re-encode quantization parameter if Q2 is greater than Q1, and otherwise selecting Q1 as the optimal re-encode quantization parameter.
-
-
2. A method for forming a re-encoded bitstream portion, the method comprising:
-
(a) receiving a compressed bitstream portion having a first quantization parameter, Q1;
(b) initiating decoding of said compressed bitstream portion to produce said first quantization parameter, Q1;
(c) receiving a second quantization parameter, Q2;
(d) determining that Q2 is less than Q1;
(e) determining that a signal derived from Q1 is substantially equal to Q2 when the quantization error signal is below a predetermined threshold;
(f) copying said compressed bitstream portion to produce a re-encoded bitstream portion; and
(g) reconstructing said bitstream portion to form a reconstructed bitstream portion. - View Dependent Claims (3, 4, 5, 6, 7, 8, 9, 10)
copying a zero quantization error bitstream portion into a frame buffer. -
7. The method of claim 2, wherein said step (e) of determining comprises determining that a first total number of bits, T1, of an inverse quantization output is within a small percentage of a second total number of bits, T2, of a quantization input.
-
8. The method of claim 2, further including:
storing a zero quantization error of the said bitstream portion into a frame buffer.
-
9. A re-encoded bitstream portion formed according to the method of claim 2.
-
10. The method of claim 2, wherein the received bitstream portion is obtained from a storage device.
-
-
11. A computer readable storage medium storing program code for causing a processing system to perform the steps of:
-
receiving a decoded quantization parameter, Q1, of a bitstream portion;
receiving a re-encode quantization parameter, Q2, of the bitstream portion;
comparing Q1 and Q2; and
selecting Q2 as the optimal re-encode quantization parameter if Q2 is greater than Q1, and otherwise selecting Q1 as the optimal re-encode quantization parameter.
-
-
12. A transcoder comprising:
-
a decoder for producing a coding parameter of a received bitstream portion; and
an encoder coupled to said decoder for producing a re-encode parameter corresponding to said received bitstream portion, comparing said re-encode parameter to said coding parameter and copying said received bitstream portion to a re-encode bitstream according to a predetermined determined correspondence between said parameters. - View Dependent Claims (13)
-
-
14. A transcoder comprising:
-
means for receiving a decoded quantization parameter, Q1, of a bitstream portion;
means for receiving a re-encode quantization parameter, Q2, of the bitstream portion;
means for comparing Q1 and Q2 and means for selecting Q2 as the optimal re-encode quantization parameter if Q2 is greater than Q1, and otherwise selecting Q1 as the optimal re-encode quantization parameter.
-
-
15. A method for forming a re-encoded bitstream portion, comprising:
-
(a) receiving a compressed bitstream portion having a first quantization parameter, Q1;
(b) initiating decoding of said compressed bitstream portion to produce said first quantization parameter, Q1, and an inverse quantization output;
(c) initiating re-encoding of said decoded bitstream portion to form a second quantization parameter, Q2, and a quantization input;
(d) determining that Q2 is less than Q1;
(e) determining that said bitstream portion corresponds to a B-picture;
(f) copying said compressed bitstream portion to produce the re-encoded bitstream portion; and
(g) reconstructing said bitstream portion to form a reconstructed bitstream portion and storing said reconstructed bitstream portion in a frame buffer. - View Dependent Claims (16)
-
-
17. A method for disposing of spare bits resulting from transcoding, comprising:
-
receiving a decoded quantization parameter, Q1, of a bitstream portion;
receiving a re-encode quantization parameter, Q2, of the bitstream portion;
determining that Q1 is greater than Q2;
selecting Q1 as an replacement re-encode quantization parameter; and
passing spare bits resulting from said replacement to another bitstream portion.
-
-
18. A method for re-encoding a first bitstream to a second bitstream, the method comprising:
-
receiving a decoded quantization parameter, Q1, of a first bitstream portion;
receiving a re-encode quantization parameter, Q2, of the first bitstream portion;
comparing Q1 and Q2;
selecting Q2 as the optimal re-encode quantization parameter if Q2 is greater than Q1, and otherwise selecting Q1 as the optimal re-encode quantization parameter; and
using the selected re-encode quantization parameter to produce a second bitstream at a different bitrate from the first bitstream.
-
-
19. A method for re-encoding an MPEG-compliant bitstream having macroblocks and I, P and B pictures, wherein the method uses hardware including a decoder and an encoder, wherein the bitstream is initially encoded with a first quantization parameter, Q1, wherein it is desired to re-encode the bitstream at a second quatization parameter, Q2, the method comprising:
-
selecting a macroblock in the bitstream;
determining whether one of the following three conditions is true regarding the selected macroblock (a) that the selected macroblock is coded in intra-frame mode in an I, P or B picture using complete or partial re-encode transcoding;
(b) that the selected macroblock is coded in inter-frame mode in a P or B picture with a same prediction macroblock at both the decoder and encoder, and that cascade-based transcoding is used;
(c) that the selected macroblock is coded in inter-frame mode in a P or B picture with a zero corresponding quantization error compensation derived from a discrete-cosine transformation calculation, and simplified transcoding is used then, if one of the conditions in the determining step is true, performing the following steps;
selecting Q1 over Q2 for the selected macroblock;
copying compressed bits from the selected macroblock directly into a re-encoded bitstream;
if cascaded-based transcoding is used then storing at least a portion of the selected macroblock for later access by the decoder or encoder;
else if simplified transcoding is used and the selected macroblock has zero quantization error then copying the selected macroblock into the current frame buffer.
-
-
20. A method for re-encoding an MPEG-compliant bitstream having macroblocks and I, P and B pictures, wherein the method uses hardware including a decoder and an encoder, wherein the bitstream is initially encoded with a first quantization parameter, Q1, wherein it is desired to re-encode the bitstream at a second quatization parameter, Q2, the method comprising:
-
selecting a macroblock in the bitstream;
first determining whether a target number of bits assigned for a macroblock during transcoding is not less than a source number of bits used for the same macroblock in a source precompressed bitstream and, if so, proceeding to the second determining step, below;
second determining whether one of the following three conditions is true regarding the selected macroblock (a) that the selected macroblock is coded in intra-frame mode in an I, P or B picture using cascaded-based or simplified transcoding;
(b) that the selected macroblock is coded in inter-frame mode in a P or B picture with a same prediction macroblock at both the decoder and encoder, and that cascade-based transcoding is used;
(c) that the selected macroblock is coded in inter-frame mode in a P or B picture with a zero corresponding quantization error compensation derived from a discrete-cosine transformation calculation, and simplified transcoding is used;
then, if one of the conditions in the second determining step is true, performing the following steps;
copying compressed bits from the selected macroblock directly into a re-encoded bitstream;
if cascaded-based transcoding is used then storing at least a portion of the selected macroblock for later access by the decoder or encoder;
else if simplified transcoding is used and the selected macroblock has zero quantization error then copying the selected macroblock into the current frame buffer. - View Dependent Claims (21, 22, 23, 24, 25)
reprocessing data at the encoder to prevent drifting. -
25. The method of claim 20, further comprising
identifying leftover bits resulting in encoding a first macroblock using Q1; - and
using the leftover bits in the processing of a second macroblock.
- and
-
Specification