It's surprisingly straightforward - take your input composite signal C and multiply it by a sin wave and a cosine wave (both of frequency 3.58MHz). Then take the three resulting waveforms (C, Csin(f) and Ccos(f)) and filter them to remove frequencies of 3.58MHz and above. If your sample rate is 14.318MHz (4 pixels per color carrier cycle) then any filter kernel that is a polynomial of (1,1,1,1) will work for this. I use (1,4,7,8,7,4,1). The resulting three waveforms are Y, I and Q which you can plug into the matrix at http://en.wikipedia.org/wiki/YIQ to get RGB. You'll need to fix up the phase to get the right colours (this is what the color burst pulse does in the actual hardware). You might have to swap sin and cos as well, I'm just writing this from memory.