Patent ID: 7787698

Claim:
A method for sign coding, comprising: determining coefficient bits to be sign coded; executing one sign coding instruction implemented in a processor to accelerate generation of context and decision values for the selected coefficient bits in a clean up pass and a significance propagation pass by reducing the number of instructions used by the processor to generate the context and decision values, the execution of the one sign coding instruction comprising: identifying state variables comprising sigma and sign bits, the state variables associated with selected coefficient bits and horizontal and vertical neighboring bits of the selected coefficient bits to be processed; identifying sign values associated with selected coefficient bits and horizontal and vertical neighboring bits of the selected coefficient bits to be processed; computing horizontal and vertical values in response to the state variables and sign values identified; generating context and decision values in response to the coefficient bit values; and processing the context and decision values by an arithmetic coder to generate compressed data output; wherein computing horizontal and vertical values in response to the state variables and sign values identified further comprises: computing the horizontal value in accordance with H =min[1,max(−1,Sigma[ m,n− 1]*(1−2*Sign[ m,n− 1])+(Sigma[ m,n+ 1]*(1−2*Sign[ m,n+ 1]))] wherein the current coding position is [m,n] and m=row, n=column, min is the minimum of two numbers (j,k), max is the maximum of two numbers (r,s), *=multiplication.