C Programming: A Modern Approach by King is what I used and it worked well for me. That will get you started with the language itself, but image and video compression is pretty maths-heavy, so your skillset will need to go beyond just programming in C.