mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:27:45 +00:00
LibGfx/JPEGWriter: Make vertical_macroblocks a local
It's only used in one function. No behavior change.
This commit is contained in:
parent
8964a52fe0
commit
ad7d25f089
1 changed files with 2 additions and 5 deletions
|
@ -102,9 +102,8 @@ public:
|
||||||
ErrorOr<void> initialize_mcu(Bitmap const& bitmap)
|
ErrorOr<void> initialize_mcu(Bitmap const& bitmap)
|
||||||
{
|
{
|
||||||
u64 const horizontal_macroblocks = ceil_div(bitmap.width(), 8);
|
u64 const horizontal_macroblocks = ceil_div(bitmap.width(), 8);
|
||||||
m_vertical_macroblocks = ceil_div(bitmap.height(), 8);
|
u64 const vertical_macroblocks = ceil_div(bitmap.height(), 8);
|
||||||
|
TRY(m_macroblocks.try_resize(horizontal_macroblocks * vertical_macroblocks));
|
||||||
TRY(m_macroblocks.try_resize(horizontal_macroblocks * m_vertical_macroblocks));
|
|
||||||
|
|
||||||
for (u16 y {}; y < bitmap.height(); ++y) {
|
for (u16 y {}; y < bitmap.height(); ++y) {
|
||||||
u16 const vertical_macroblock_index = y / 8;
|
u16 const vertical_macroblock_index = y / 8;
|
||||||
|
@ -339,8 +338,6 @@ private:
|
||||||
Vector<Macroblock> m_macroblocks {};
|
Vector<Macroblock> m_macroblocks {};
|
||||||
Array<i16, 3> m_last_dc_values {};
|
Array<i16, 3> m_last_dc_values {};
|
||||||
|
|
||||||
u64 m_vertical_macroblocks {};
|
|
||||||
|
|
||||||
JPEGBigEndianOutputBitStream m_bit_stream;
|
JPEGBigEndianOutputBitStream m_bit_stream;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue