Nested entropy encoding
Methods and systems for improving coding decoding efficiency of video by providing a syntax modeler, a buffer, and a decoder. The syntax modeler may associate a first sequence of symbols with syntax elements. The buffer may store tables, each represented by a symbol in the first sequence, and each used to associate a respective symbol in a second sequence of symbols with encoded data. The decoder decodes the data into a bitstream using the second sequence retrieved from a table.
1. A method for decoding a motion vector predictor of a current block in a picture of a sequence of pictures, the method comprising:
identifying a first adjacent block that is adjacent to the current block in the picture;
identifying a second adjacent block that is adjacent to the current block in the picture;
when a motion vector of the first adjacent block is not equal to a motion vector of the second adjacent block, generating a motion vector predictor candidate set comprising the motion vectors of both the first and the second adjacent blocks;
when the motion vector of the first adjacent block is equal to the motion vector of the second adjacent block, generating a motion vector predictor candidate set comprising only the motion vector of the first adjacent block or the motion vector of the second adjacent block;
receiving a flag from a bitstream indicating whether a temporally-located motion vector can be used as a motion vector predictor;
when the flag indicates that a temporally-located motion vector can be used as a motion vector predictor, including a motion vector of a block in another picture in the motion vector predictor candidate set;
when the flag indicates that a temporally-located motion vector cannot be used as a motion vector predictor, excluding the motion vector of the block in another picture from the motion vector predictor candidate set; and
selecting a motion vector from the motion vector predictor candidate set as the motion vector predictor of the current block,
wherein a motion vector for the current block is derived based on the selected motion vector predictor and a motion vector differential.