Merge branch 'cache-update'

This commit is contained in:
itsmattkc
2022-09-15 16:10:25 -07:00
77 changed files with 2334 additions and 1597 deletions
+15
View File
@@ -243,6 +243,21 @@ QString VideoParams::GetFormatName(VideoParams::Format format)
return QCoreApplication::translate("VideoParams", "Unknown (0x%1)").arg(format, 0, 16);
}
int VideoParams::GetDividerForTargetResolution(int src_width, int src_height, int dst_width, int dst_height)
{
int divider = 0;
int test_width, test_height;
do {
divider++;
test_width = VideoParams::GetScaledDimension(src_width, divider);
test_height = VideoParams::GetScaledDimension(src_height, divider);
} while (test_width > dst_width || test_height > dst_height);
return divider;
}
void VideoParams::calculate_effective_size()
{
effective_width_ = GetScaledDimension(width(), divider_);