Skip to content

Commit e532622

Browse files
6by9popcornmix
authored andcommitted
staging/bcm2835-codec: bytesperline for YUV420/YVU420 needs to be 64
Matching #4419, the ISP block (which is also used on the input of the encoder, and output of the decoder) needs the base address of all planes to be aligned to multiples of 32. This includes the chroma planes of YUV420 and YVU420. If the height is only a multiple of 2 (not 4), then you get an odd number of lines in the second plane, which means the 3rd plane starts at a multiple of bytesperline/2. Set the minimum bytesperline alignment to 64 for those formats so that the plane alignment is always right. Signed-off-by: Dave Stevenson <[email protected]>
1 parent a0dc7c5 commit e532622

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,14 @@ static const struct bcm2835_codec_fmt supported_formats[] = {
157157
/* YUV formats */
158158
.fourcc = V4L2_PIX_FMT_YUV420,
159159
.depth = 8,
160-
.bytesperline_align = 32,
160+
.bytesperline_align = 64,
161161
.flags = 0,
162162
.mmal_fmt = MMAL_ENCODING_I420,
163163
.size_multiplier_x2 = 3,
164164
}, {
165165
.fourcc = V4L2_PIX_FMT_YVU420,
166166
.depth = 8,
167-
.bytesperline_align = 32,
167+
.bytesperline_align = 64,
168168
.flags = 0,
169169
.mmal_fmt = MMAL_ENCODING_YV12,
170170
.size_multiplier_x2 = 3,

0 commit comments

Comments
 (0)