Patent ID: 8229001

Claim:
A method for calculating a flag parameter in a digital image decoding, the method comprising steps of: a) receiving a macroblock comprising M×N blocks K 11 ˜Kmn, wherein M, N, m and n are positive integral numbers which are greater than 1 respectively; b) performing a first operation on M blocks K 11 ˜Km 1 along a first edge in a first direction to obtain corresponding M first parameters A 11 ˜Am 1 ; c) storing the first parameters A 11 ˜Am 1 into corresponding locations in a first buffer array; d) performing a second operation on N blocks K 11 ˜K 1 n along a second edge in a second direction to obtain corresponding N second parameters B 11 ˜B 1 n; e) storing the second parameters B 11 ˜B 1 n into corresponding locations in a second buffer array; f) calculating a flag parameter corresponding to a given block according to corresponding values stored in the first and second buffer arrays according to a third operation; g) storing the flag parameter into a location corresponding to a neighboring right block next to the given block in the first buffer array and a location corresponding to a neighboring lower block next to the given block in the second buffer array; and h) repeating the steps f) and g) for each of the M×N blocks in the order from blocks along a left most edge, to blocks along a top most edge, then to blocks along a second left edge, and then to blocks along a second top edge.