diff options
Diffstat (limited to 'src/multimedia/video/qvideotexturehelper_p.h')
-rw-r--r-- | src/multimedia/video/qvideotexturehelper_p.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/multimedia/video/qvideotexturehelper_p.h b/src/multimedia/video/qvideotexturehelper_p.h index e0b72243a..a984101e5 100644 --- a/src/multimedia/video/qvideotexturehelper_p.h +++ b/src/multimedia/video/qvideotexturehelper_p.h @@ -57,11 +57,14 @@ struct TextureDescription int x; int y; }; - using BytesForSize = int(*)(QSize s); + using BytesRequired = int(*)(int stride, int height); + + inline int strideForWidth(int width) const { return (width*strideFactor + 15) & ~15; } + inline int bytesForSize(QSize s) const { return bytesRequired(strideForWidth(s.width()), s.height()); } int nplanes; - int stride; - BytesForSize bytesForSize; + int strideFactor; + BytesRequired bytesRequired; QRhiTexture::Format textureFormat[maxPlanes]; SizeScale sizeScale[maxPlanes]; }; |