improved render channel count system

This commit is contained in:
itsmattkc
2020-11-15 22:16:40 +11:00
parent ee5307336e
commit 0d0766e4fb
83 changed files with 1017 additions and 1132 deletions
+5 -3
View File
@@ -28,22 +28,24 @@ FFmpegFramePool::FFmpegFramePool(int element_count) :
MemoryPool(element_count),
width_(0),
height_(0),
format_(PixelFormat::PIX_FMT_INVALID)
format_(VideoParams::kFormatInvalid),
channel_count_(0)
{
}
void FFmpegFramePool::SetParameters(int width, int height, PixelFormat::Format format)
void FFmpegFramePool::SetParameters(int width, int height, VideoParams::Format format, int channel_count)
{
Clear();
width_ = width;
height_ = height;
format_ = format;
channel_count_ = channel_count;
}
size_t FFmpegFramePool::GetElementSize()
{
return Frame::generate_linesize_bytes(width_, format_) * height_;
return Frame::generate_linesize_bytes(width_, format_, channel_count_) * height_;
}
OLIVE_NAMESPACE_EXIT