Linux Game Programming for PC & Embedded Systems using SDL
Presented by
Fore June
Author of Windows Fan, Linux Fan

Sample program for converting RGB to YCbCr to DCT coefficients and vice versa.

common.h
rgb_ybr.h
dct_video.h
encode.h
dctplayer.cpp
encode.cpp
dct_video.cpp
rgb_ybr.cpp
Makefile
sample_video.raw



Makefile:
LIBSDL =  -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL  -lpthread

PROG    = dctplayer
CC=g++
INCLS	=  -I/usr/include 

#source codes
OBJ1 = dctplayer.o encode.o
OBJ2 = rgb_ybr.o dct_video.o
 
#$< evaluates to the target's dependencies,
#$@ evaluates to the target
 
$(PROG): $(OBJ1) $(OBJ2)
	$(CC) -o $@ $(OBJ1) $(OBJ2)  $(LIBSDL) 
 
$(OBJ1):
	$(CC) -c  $*.cpp $(INCLS) 
                                                                                
$(OBJ2):
	$(CC) -c  $*.cpp $(INCLS) 
                                                                                
clean:
	rm $(OBJ1)