diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-14 20:29:20 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-14 20:29:20 +0100 |
| commit | 129afab72bfc026b5704c41a6bfc0f4b3a2c4033 (patch) | |
| tree | cb24e2c035f9ac8e21f307e76defcc88bf343145 /src/lib/image.cc | |
| parent | 49f9cb10018bf4ec07a60d1599cbe62d735baa23 (diff) | |
Round image line sizes up to 32. Seems to help with LHS image corruption with both crop and a post-processing filter.
Diffstat (limited to 'src/lib/image.cc')
| -rw-r--r-- | src/lib/image.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/image.cc b/src/lib/image.cc index ce44ec95b..c8849303c 100644 --- a/src/lib/image.cc +++ b/src/lib/image.cc @@ -260,15 +260,15 @@ SimpleImage::SimpleImage (PixelFormat p, Size s) switch (p) { case PIX_FMT_RGB24: - _line_size[0] = s.width * 3; + _line_size[0] = round_up (s.width * 3, 32); break; case PIX_FMT_RGBA: - _line_size[0] = s.width * 4; + _line_size[0] = round_up (s.width * 4, 32); break; case PIX_FMT_YUV420P: - _line_size[0] = s.width; - _line_size[1] = s.width / 2; - _line_size[2] = s.width / 2; + _line_size[0] = round_up (s.width, 32); + _line_size[1] = round_up (s.width / 2, 32); + _line_size[2] = round_up (s.width / 2, 32); break; default: assert (false); |
