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 and vice versa.

common.h
rgb_ybr.h
encode.h
rgb_ybr.cpp
encode.cpp
typlayer.cpp
Makefile
sample_video.raw



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

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

#source codes
SRCS = typlayer.cpp rgb_ybr.cpp encode.cpp 
#substitute .cpp by .o to obtain object filenames
OBJS = $(SRCS:.cpp=.o) 
 
#$< evaluates to the target's dependencies,
#$@ evaluates to the target
 
$(PROG): $(OBJS)
	$(CC) -o $@ $(OBJS)   $(LIBSDL) 
 
$(OBJS):
	$(CC) -c  $*.cpp $(INCLS) 
                                                                                
clean:
	rm $(OBJS)