video: Fix line padding calculation for 16 and 24 bpp bitmaps 39/248539/4
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Wed, 25 Nov 2020 11:13:12 +0000 (12:13 +0100)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 1 Dec 2020 03:41:51 +0000 (03:41 +0000)
commit748c74e0bb9454001ca854ddf8360d7677b397f7
tree1e8e99d168c53908eb2cf2b7e41f03f47c2ca854
parente6812c5903e82bf3181715f9c306842ca78fff28
video: Fix line padding calculation for 16 and 24 bpp bitmaps

The line size in the bitmap file is multiple of 4 bytes. In current code
the complement of row size to a multiple of 4 bytes is further unnecessarily
multiplied by the pixel size. This result in incorrect displaying of bitmaps
with image width which is not multiple of 4 pixels. Fix this by removing
the unnecessary multiplication.

Tested with 24BPP bitmap and XRGB32 display.

Change-Id: I9bd307780e388a70f47823444fe3ecdf910d08fb
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
drivers/video/video_bmp.c