A method and apparatus for adaptive inter prediction mode coding are disclosed. In the current HEVC, a fixed set of
variable length codes is used for the underlying video data, which may not optimally match the statistics of underlying video data. Consequently, the compression efficiency associated with the fixed set of
variable length codes will be compromised. Accordingly, an
adaptive coding scheme for inter prediction
modes is disclosed. The
variable length codes used for each inter prediction mode in each coding unit depth is adaptively determined by its respective statistics. The statistics can be measured as the
frequency of occurrence of each mode. In one embodiment according to the present invention, counters are used to collect the statistics. According to one embodiment of the present invention, the statistics of inter prediction
modes are collected from the previous slice and the set of variable length codes is determined for the subsequent slice (immediately following the previous slice) accordingly. According to another embodiment of the present invention, the statistics of inter prediction
modes are updated for each coding unit and the
variable length code for each mode is adjusted according to the statistics change during the coding process. According to another embodiment of the present invention, the
variable length code for each mode is reset in the beginning of each slice. The reset
code word table is either a predefined
code word table for whole sequence or a
code word table determined by the previous slice.