Patent ID: 9602815
Date: 2017-03-21
CPC Classifications: H04N

Claim:
1. A video encoding apparatus comprising: processing circuitry configured to: acquire one or more available blocks having a motion vector from encoded blocks adjacent to a to-be-encoded block and a number of the one or more available blocks; select a selected block from the one or more available blocks; select a selected code table from a plurality of code tables depending on the number of the one or more available blocks, wherein when there are two available blocks, a code table including two indexes 0 and 1 is selected, when there are three available blocks, a code table including indexes 0, 1 and 2 is selected, and when there are four available blocks, a code table including indexes 0, 1, 2, 3 and 4 is selected; and encode selection information specifying the selected block using the selected code table, the selected code table including index and code words corresponding to the index, and the to-be-encoded block by using a motion vector of the selected block, wherein: a maximum number of the index is equal to a number obtained by subtracting 1 from the number of the one or more available blocks; the maximum number of the index is varied depending on the number of the one or more available blocks; and when the number of the one or more available blocks is 1, the selection information is not encoded.