Skip to content

Commit d50f7d9

Browse files
naushirpelwell
authored andcommitted
staging: vc04_services: isp: Set the YUV420/YVU420 format stride to 64 bytes
The bcm2835 ISP requires the base address of all input/output planes to have 32 byte alignment. Using a Y stride of 32 bytes would not guarantee that the V plane would fulfil this, e.g. a height of 650 lines would mean the V plane buffer is not 32 byte aligned for YUV420 formats. Having a Y stride of 64 bytes would ensure both U and V planes have a 32 byte alignment, as the luma height will always be an even number of lines. Signed-off-by: Naushir Patuck <[email protected]>
1 parent 4e55e87 commit d50f7d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/staging/vc04_services/bcm2835-isp/bcm2835-isp-fmts.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static const struct bcm2835_isp_fmt supported_formats[] = {
4848
/* YUV formats */
4949
.fourcc = V4L2_PIX_FMT_YUV420,
5050
.depth = 8,
51-
.bytesperline_align = 32,
51+
.bytesperline_align = 64,
5252
.mmal_fmt = MMAL_ENCODING_I420,
5353
.size_multiplier_x2 = 3,
5454
.colorspace_mask = V4L2_COLORSPACE_MASK_YUV,
@@ -57,7 +57,7 @@ static const struct bcm2835_isp_fmt supported_formats[] = {
5757
}, {
5858
.fourcc = V4L2_PIX_FMT_YVU420,
5959
.depth = 8,
60-
.bytesperline_align = 32,
60+
.bytesperline_align = 64,
6161
.mmal_fmt = MMAL_ENCODING_YV12,
6262
.size_multiplier_x2 = 3,
6363
.colorspace_mask = V4L2_COLORSPACE_MASK_YUV,

0 commit comments

Comments
 (0)