Digital Media Processing Dsp Algorithms — Using C Pdf

Effective media processing relies on several fundamental algorithms that can be implemented efficiently in C: Finite Impulse Response (FIR) Filters

#include <stdio.h> #include <math.h>

YCbCr rgb_to_ycbcr(RGB rgb) YCbCr yuv; yuv.y = 0.299f * rgb.r + 0.587f * rgb.g + 0.114f * rgb.b; yuv.cb = -0.1687f * rgb.r - 0.3313f * rgb.g + 0.5f * rgb.b + 128; yuv.cr = 0.5f * rgb.r - 0.4187f * rgb.g - 0.0813f * rgb.b + 128; return yuv; digital media processing dsp algorithms using c pdf