Abstract
An encoder of selecting a number of candidate prediction modes for a block in a video sequence, the encoder comprising a first calculator configured to establish a relation between a feature value of a first block in a first video sequence and an optimal number of candidate prediction modes for the first video sequence, and identify the number of first candidate prediction modes for a second block in a second video sequence based on the relation, a second calculator configured to calculate a function value of each of prediction modes of the second block in the second video sequence using a cost function, and a feature value of the second block based on the function value of each of prediction modes of the second block, and a third calculator configured to receive a predetermined number of rate-distortion optimization (RDO) operations for the second video sequence, identify the balance of the predetermined number of RDO operations available for a frame in which the second block in the second video sequence is located, allocate the available RDO operations among blocks in the frame, and identify whether there are surplus RDO operations after processing a block previous to the second block in the frame of the second video sequence.