Dynamic packet size control for MPEG-4 data partition mode
Abstract
A dynamic AC prediction technique is implemented in a data partition mode which automatically disables AC prediction for encoding the current macroblock in the next packet when packet overflow occurs. Otherwise, when there is no overflow, AC prediction remains enabled to maintain compression efficiency. More particularly, in the preferred embodiment, a determination is first made whether a macroblock causes a packet overflow if it is encoded in the current packet. If so, a new packet is initiated into which the macroblock is encoded without AC prediction as the first macroblock. Otherwise, the macroblock with AC prediction remains in the current packet and a new macroblock is encoded.
Claims
exact text as granted — not AI-modified1 . A dynamic AC prediction method comprising:
performing DC and AC prediction on a transform coefficient data set having DC and AC coefficients; determining whether an overflow condition is to occur in a current packet; if no overflow condition is to occur, supplying a data set having AC predict coefficients and DC predict coefficients to the current data packet; and if an overflow condition is to occur, stopping the AC prediction and supplying a data set having the AC coefficients and the DC predict coefficients to a new data packet.
2 . The dynamic AC prediction method of claim 1 wherein before determining whether an overflow condition is to occur, determining whether the transform coefficient data set is associated with an intra block and an AC prediction dynamic mode is selected.
3 . The dynamic AC prediction method of claim 2 further comprising:
determining whether the transform coefficient data set is associated with an inter block or an intra block; if the transform coefficient data set is associated with an inter block, supplying a data set having the AC coefficients and the DC coefficients to the current data packet; if the transform coefficient data set is associated with an intra block, determining whether a AC prediction OFF mode is selected; if the AC prediction OFF mode is selected, supplying a data set having the AC coefficients and the DC predict coefficients to the current data packet; and if the AC prediction ON mode is selected, supplying a data set having the predict AC coefficients and the predict DC coefficients to the current data packet.
4 . The dynamic AC prediction method of claim 1 wherein the overflow condition occurs when
( Nonzero#−DCnonzero# )*31+128+ BitsInPacket>PacketSize
wherein Nonzero# is a number of nonzero AC coefficients determined by AC prediction, DCnonzero# is a number of nonzero DC coefficients determined by DC prediction, 31 is a maximum size for a nonzero coefficient, 128 is maximum number of bits for part 1 and part 2 of a macroblock processed in a selected data partition mode, BitsInPacket is a number of bits currently in the current packet until a previous macroblock, and PacketSize is a packet size for a MPEG-4 data partition mode.
5 . The dynamic AC prediction method of claim 4 , wherein the packet size is 1024 bits, 2048 bits, or 4096 bits.
6 . The dynamic AC prediction method of claim 1 , wherein DC prediction comprises:
determining whether horizontal prediction or vertical prediction is to be performed; if horizontal prediction is to be performed, determining the DC predict coefficient, QF X , from the transform coefficient data set which is associated with a current block X according to: QF X =PQF X +F A //DC — scaler ; and if vertical prediction is to be performed, determining the DC predict coefficient, QF X , from the current block X according to: QF X =PQF X +F C //DC — scaler where PQF X is DC coefficient of the current block X, F C and F A are DC coefficients of blocks top adjacent block C and left adjacent block A relative to the current block X, DC_scaler is quantization step size Q p of a relevant block.
7 . The dynamic AC prediction method of claim 6 , wherein AC prediction comprises:
if horizontal prediction is to be performed, determining AC predict coefficient QF X [i] [0] from the current block X according to: QF X [0] [ i]=PQF X [0] [ i]+ ( QF A [0 ] [i]*QP A )// QP X ; and if vertical prediction is to be performed, determining AC predict coefficient QF X [0] [j] from the current block X according to: QF x [j][ 0]= PQF x [j] [ 0]+( QF c [j] [ 0]* QP c )// QP x where i=1 to 7, j=1 to 7, QF A [i][j] is AC coefficient from a left adjacent block A, QF c [i] [j] is AC coefficient from a top adjacent block C, PQF X is AC coefficient of the current block X, and QP A , QP C , and QP X are quantization step sizes associated with blocks A, C, and X, respectively.
8 . The dynamic AC prediction method of claim 5 , wherein the transform coefficient data set is a product of a Discreet Cosine Transform (DCT).
9 . An AC/DC prediction apparatus coupled to a buffer, a Variable Length Coding circuit, and a Central Processing Unit (CPU) comprising:
a DC prediction circuit receiving at least one DC coefficient of a transform coefficient data set from the buffer, the DC prediction circuit performing prediction for the DC coefficient; an AC prediction circuit coupled to the DC circuit, the AC prediction circuit receiving AC coefficients of a transform coefficient data set from the buffer, the AC prediction circuit performing prediction for the AC coefficients; and a decision logic coupled to the AC prediction circuit and the DC prediction circuit, the decision logic determining whether an overflow condition is to occur in a current packet, if no overflow condition is to occur, the decision logic acting to supply a data set having AC predict coefficients and DC predict coefficients to the current data packet, if an overflow condition is to occur, the decision logic disabling the AC prediction circuit and acting to supply a data set having AC coefficients and DC predict coefficients to a new data packet.
10 . The AC/DC prediction apparatus of claim 9 , wherein before determining whether an overflow condition is to occur, the decision logic determining whether the transform coefficient data set is associated with an intra block and an AC prediction dynamic mode is selected.
11 . The AC/DC prediction apparatus of claim 10 , wherein the decision logic further determining whether the transform coefficient data set is associated with an inter block or an intra block, if the transform coefficient data set is associated with an inter block, the decision logic acting to supply a data set having the AC coefficients and the DC coefficients to the current data packet, if the transform coefficient data set is associated with an intra block, the decision logic determining whether a AC prediction OFF mode is selected, if the AC prediction OFF mode is selected, the decision logic acting to supply a data set having the AC coefficients and the DC predict coefficients to the current data packet, and if the AC prediction ON mode is selected, the decision logic acting to supply a data set having the predict AC coefficients and the predict DC coefficients to the current data packet.
12 . The AC/DC prediction apparatus of claim 9 , wherein the overflow condition occurs when:
( Nonzero#−DCnonzero# )*31+128+ BitsInPacket>PacketSize wherein Nonzero# is a number of nonzero AC coefficients determined by AC prediction, DCnonzero# is a number of nonzero DC coefficients determined by DC prediction, 31 is a maximum size for a nonzero coefficient, 128 is maximum number of bits for part 1 and part 2 of a macroblock processed in a selected data partition mode, BitsInPacket is a number of bits currently in the current packet until a previous macroblock, and PacketSize is a packet size for a MPEG-4 data partition mode.
13 . The AC/DC prediction apparatus of claim 9 , wherein the packet size is 1024 bits, 2048 bits, or 4096 bits.
14 . The AC/DC prediction apparatus of claim 8 , wherein the DC prediction circuit determining whether horizontal prediction or vertical prediction is to be performed, if horizontal prediction is to be performed, determining the DC predict coefficient, QF X , from the transform coefficient data set which is associated with a current block X according to:
QF X =PQF X +F A //DC — scaler ; and if vertical prediction is to be performed, determining the DC predict coefficient, QF X , from the current block X according to: QF X =PQF X +F C //DC — scaler where PQF X is DC coefficient of the current block X, F C and F A are DC coefficients of blocks top adjacent block C and left adjacent block A relative to the current block X, DC_scaler is quantization step size Q p of a relevant block.
15 . The AC/DC prediction apparatus of claim 14 , wherein if horizontal prediction is to be performed, determining AC predict coefficient QF x [i] [ 0 ] from the current block X according to:
QF x [0] [ i]=PQF X [0] [ i]+ ( QF A [0] [ i]*QP A )// QP X ; and if vertical prediction is to be performed, determining AC predict coefficient QF X [0] [j] from the current block X according to: QF X [j] [ 0]= PQF X [j] [ 0]+( QF C [j] [ 0]* QP C )// QP X where i=1 to 7, j=1 to 7, QF A [i][j] is AC coefficient from a left adjacent block A, QF C [i] [j] is AC coefficient from a top adjacent block C, PQF X is AC coefficient of the current block X, and QP A , QP C , and QP X are quantization step sizes associated with blocks A, C, and X, respectively.
16 . The AC/DC prediction apparatus of claim 13 , wherein the transform coefficient data set is a product of a Discreet Cosine Transform (DCT).
17 . A computing device adapted to perform dynamic AC prediction comprising:
a central processing unit (CPU); system memory coupled to the CPU; a video interface coupled to the CPU, the video interface receiving video data from a video source; a video display coupled to the CPU; a graphics/display controller coupled to the CPU, the video interface, the video display, and the system memory, the graphics controller comprising:
a memory interface unit (MIU);
memory coupled to the MIU; and
a video encoder connected to the MIU and coupled to the memory, the video encoder comprising:
a buffer;
a Variable Length Coder (VLC); and
an AC/DC prediction circuit coupled to the buffer and the VLC, the AC/DC prediction circuit comprising:
a DC prediction circuit receiving at least one DC coefficient of a transform coefficient data set from the buffer, the DC prediction circuit performing prediction for the DC coefficient;
an AC prediction circuit coupled to the DC circuit, the AC prediction circuit receiving AC coefficients of a transform coefficient data set from the buffer, the AC prediction circuit performing prediction for the AC coefficients; and
a decision logic coupled to the AC prediction circuit and the DC prediction circuit, the decision logic determining whether an overflow condition is to occur in a current packet, if no overflow condition is to occur, the decision logic supplying a data set having AC predict coefficients and DC predict coefficients to the current data packet, if an overflow condition is to occur, the decision logic disabling the AC prediction circuit and supplying a data set having AC coefficients and DC predict coefficients to a new data packet.
18 . The computing device of claim 17 , wherein before determining whether an overflow condition is to occur, the decision logic determining whether the transform coefficient data set is associated with an intra block and an AC prediction dynamic mode is selected.
19 . The computing device of claim 18 , wherein the decision logic further determining whether the transform coefficient data set is associated with an inter block or an intra block, if the transform coefficient data set is associated with an inter block, the decision logic acting to supply a data set having the AC coefficients and the DC coefficients to the current data packet, if the transform coefficient data set is associated with an intra block, the decision logic determining whether a AC prediction OFF mode is selected, if the AC prediction OFF mode is selected, the decision logic acting to supply a data set having the AC coefficients and the DC predict coefficients to the current data packet, and if the AC prediction ON mode is selected, the decision logic acting to supply a data set having the predict AC coefficients and the predict DC coefficients to the current data packet.
20 . The computing device of claim 17 , wherein the overflow condition occurs when
( Nonzero#−DCnonzero#)* 31+128+ BitsInPacket>PacketSize wherein Nonzero# is a number of nonzero AC coefficients determined by AC prediction, DCnonzero# is a number of nonzero DC coefficients determined by DC prediction, 31 is a maximum size for a nonzero coefficient, 128 is maximum number of bits for part 1 and part 2 of a macroblock processed in a selected data partition mode, BitsInPacket is a number of bits currently in the current packet until a previous macroblock, and PacketSize is a packet size for a MPEG-4 data partition mode.
21 . The computing device of claim 19 , wherein the graphics/display controller further comprising a video decoder connected to the MIU and coupled to the memory, the video decoder decompressing compressed video signals with dynamic AC prediction.Join the waitlist — get patent alerts
Track US2005111545A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.