In various embodiments, encoder 100 including codeword table 102, coding logic/writer 104, and macroblock type buffer 106 may be implemented in hardware, e.g. via application specific integrated circuit (ASIC), or in software, e.g. in programming languages such as C, or a combination of both.