Apparatus and method for removing the offset and shading of a video signal