mpegvideo_enc: factor out denominator and explicitly cast operands