Skip to content

Commit 970a68f

Browse files
jc-kynesimpelwell
authored andcommitted
media/hevc_d: Fix height rounding for old sand formats
Round old sand format heights to 16 rather than 8 as Pi4 ISP input requires this (gives EFAULT otherwise). As ISP cannot take new sand formats do not change them. Signed-off-by: John Cox <jc@kynesim.co.uk>
1 parent 7a41407 commit 970a68f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/media/platform/raspberrypi/hevc_dec/hevc_d_video.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static void hevc_d_prepare_dst_format(struct v4l2_pix_format_mplane *pix_fmt)
144144
case V4L2_PIX_FMT_NV12_COL128:
145145
/* Width rounds up to columns */
146146
width = ALIGN(width, 128);
147-
height = ALIGN(height, 8);
147+
height = ALIGN(height, 16);
148148

149149
/* column height
150150
* Accept suggested shape if at least min & < 2 * min
@@ -158,7 +158,7 @@ static void hevc_d_prepare_dst_format(struct v4l2_pix_format_mplane *pix_fmt)
158158
* columns
159159
*/
160160
width = ALIGN(((width + 2) / 3), 32) * 3;
161-
height = ALIGN(height, 8);
161+
height = ALIGN(height, 16);
162162

163163
/* column height
164164
* Accept suggested shape if at least min & < 2 * min

0 commit comments

Comments
 (0)