viewer: implement playback resolution option
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user