Patent attributes
The present invention provides arithmetic encoder and decoder, and methods implemented therein for termination of arithmetic coding. The arithmetic encoder first determines whether a bin value indicates termination of arithmetic encoding. If the bin value is determined not indicating termination of arithmetic encoding, no bit is written in a bitstream indicative of the bin value so determined. If the bin value is determined indicating termination of arithmetic encoding, a stop bit is written in the bitstream. The arithmetic decoder determines whether or not the end of a coded slice has been reached, based on a number of bits in the bitstream. More specifically, the arithmetic decoder makes a determination, based on a number of bits preceding a stop bit located in a last byte in the bitstream.