viewer: implement playback resolution option

This commit is contained in:
itsmattkc
2022-06-22 23:55:30 -07:00
parent eb046fcd3e
commit 15d6f407eb
5 changed files with 43 additions and 24 deletions
+9
View File
@@ -200,6 +200,15 @@ int VideoParams::GetBytesPerPixel(VideoParams::Format format, int channels)
return GetBytesPerChannel(format) * channels;
}
QString VideoParams::GetNameForDivider(int div)
{
if (div == 1) {
return QCoreApplication::translate("VideoParams", "Full");
} else {
return QCoreApplication::translate("VideoParams", "1/%1").arg(div);
}
}
bool VideoParams::FormatIsFloat(VideoParams::Format format)
{
switch (format) {
+2
View File
@@ -231,6 +231,8 @@ public:
return GetBufferSize(width_, height_, format_, channel_count_);
}
static QString GetNameForDivider(int div);
static bool FormatIsFloat(Format format);
static QString GetFormatName(Format format);