Patent ID: 9544599
Date: 2017-01-10
CPC Classifications: H03M,H04N

Claim:
1. A image data encoding method comprising: selecting one of a plurality of complementary sub-ranges of a set of code values according to a value of a current input data value, proportions of the sub-ranges relative to the set of code values being defined by a context variable associated with the input data value; assigning the current input data value to a code value within the selected sub-range; modifying the set of code values in dependence upon the assigned code value and a size of the selected sub-range; detecting whether the set of code values is less than a predetermined minimum size and if so, successively increasing the size of the set of code values until reaching at least the predetermined minimum size; outputting an encoded data bit in response to each size-increasing operation; modifying the context variable, for use in respect of a next input data value, to increase a proportion of the set of code values in the sub-range which was selected for the current data value; and after encoding a group of input data values, terminating by circuitry the output data by: setting a value defining an end of the set of code values to a value having a plurality of least significant bits equal to zero to have the plurality of least significant bits ignored to reduce a number of bits to be outputted at the termination of the output data; increasing the size of the set of code values; and writing the value defining the end of the set of code values to the output data.