Fix integer overflows with large resolutions
Fix integer overflows with large resolutions

Limits video size so that the number of luma and chroma pixels can be
stored in an int. Fixes some integer overflows that resulted in
segmentation faults.

ultravideo/kvazaar,ultravideo/kvazaar,ultravideo/kvazaar,ultravideo/kvazaar,ultravideo/kvazaar