This is something that came to mind when I was thinking about minimizing quality loss of video uploads to YouTube after the videos get compressed and processed. While I am not aware of the exact mechanisms by which YouTube compresses their videos, I would like to ask if using the same video codec to compress as the original video file will ensure minimal quality loss, or if there is any relationship, like for example codec A can be encoded to codec B with less quality loss, while codec A to codec C would be a lot less pretty with lots of ugly artifacts.
This is, of course, assuming the bitrates are constant when comparing various codecs.