frame/texture: use dividers when allocating buffers

Allows render pipeline to know the "real" and "simulated" resolution of a
divided buffer.
This commit is contained in:
itsmattkc
2020-05-04 01:08:46 +10:00
parent e4e797c901
commit 2b1640ac04
15 changed files with 74 additions and 70 deletions
+3 -3
View File
@@ -47,7 +47,7 @@ void Frame::set_video_params(const VideoRenderingParams &params)
params_ = params;
// Align linesize to 16
linesize_ = qCeil(static_cast<double>(params.width()) / 16.0) * 16;
linesize_ = qCeil(static_cast<double>(width()) / 16.0) * 16;
}
int Frame::linesize_pixels() const
@@ -62,12 +62,12 @@ int Frame::linesize_bytes() const
const int &Frame::width() const
{
return params_.width();
return params_.effective_width();
}
const int &Frame::height() const
{
return params_.height();
return params_.effective_height();
}
const PixelFormat::Format &Frame::format() const