A video codec for real-time encoding / decoding of digitized video data with high compression efficiency, comprising a frame 
encoder receiving input frame pixels; a codec setting unit for setting and storing coding setting parameters; a 
CPU load controller for controlling desired frame encoding time and CPU loading; a rate controller for controlling 
frame size; a coding statistics memory for storing frequency tables for 
arithmetic coding of 
bitstream parameters and a 
reference frame buffer for storing reference frames. The frame 
encoder comprises a 
motion estimation unit, a frame head coding unit, a coded frame reconstruction and storage unit and a 
macroblock encoding unit. The 
macroblock encoding unit provides calculation of texture prediction and prediction error, transforming texture prediction error and quantization of transform coefficient, calculation of 
motion vector prediction and prediction error and arithmetic context modeling for motion vectors, header parameters and transform coefficients. The codec also includes a deblocking unit for 
processing video data to eliminate blocking effect from restored data encoded at high 
distortion level, which may be a part of 
encoder or decoder, an internal resize unit, providing matching 
downscaling of a frame before encoding and upscaling of decoded frame according to the coding setting parameters, and a 
noise suppression unit.