1. A video codec having a modular structure for encoding/decoding a digitized sequence of video frames in a multi-core system, the video codec comprising: a memory unit; a multithreading engine; a plurality of control modules to control all coding logic and workflow; and a plurality of task modules to execute tasks assigned by the multithreading engine; wherein the modules are organized in a tree structure, each module corresponding to a coding operation, the modules share the memory and communicate with each other by control messages, and the multithreading engine initializes tasks, maintains context of each task and assigns at least one of the plurality of task modules to each task for execution, sends and handles messages, provides synchronization and communication.