Video Coding: An Introduction to Standard Codecs

From the ground up, this guide explains video coding algorithms to video compression systems, and more.
<span class="fixed">/*ffdct.c*//*fast forward discrete cosine transform in the current frame */#include "config.h"#include "global.h"#define W1 2841 /* sqrt (2) cos</span> (<span class="unicode">?</span>/16)<<11<span class="fixed">*/</span><span class="fixed">#define W2 2676 /* sqrt (2) cos</span> (2<span class="unicode">?</span>/16)<<11<span class="fixed">*/</span><span class="fixed">#define W3 2408 /* sqrt (2) cos</span> (3<span class="unicode">?</span>/16)<<11<span class="fixed">*/</span><span class="fixed">#define W5 1609 /* sqrt (2) cos</span> (5<span class="unicode">?</span>/16)<<11<span class="fixed">*/</span><span class="fixed">#define W6 1108 /* sqrt (2) cos</span> (6<span class="unicode">?</span>/16)<<11<span class="fixed">*/</span><span class="fixed">#define W7 565 /* sqrt (2) cos</span> (7<span class="unicode">?</span>/16)<<11<span class="fixed">*/</span><span class="fixed">#define W10 2276 /* W1 - W7 */#define W11 3406 /* W1 + W7 */#define W12 4017 /* W3 + W5 */#define W13 799 /* W3 - W5 */#define W14 1568 /* W2 - W6 */#define W15 3784 /* W2 + W6 *//* global declarations */void ffdct _ANSI_ARGS_((int *block));void ffdct(block)int *block;{int s[10],t[10],r[10];int *p;int j, temp;/*forward transformation in "H" direction*/p = block;for(j=0; j<64; j +=8 ){/* first stage transformation */s[0]= (*(p) + *(p+7));s[1]= (*(p+1) +...