static void aspeed_video_set_resolution(struct aspeed_video *video)
 {
        struct v4l2_bt_timings *act = &video->active_timings;
-       unsigned int size = act->width * act->height;
+       unsigned int size = act->width * ALIGN(act->height, 8);
 
        /* Set capture/compression frame sizes */
        aspeed_video_calc_compressed_size(video, size);
                u32 width = ALIGN(act->width, 64);
 
                aspeed_video_write(video, VE_CAP_WINDOW, width << 16 | act->height);
-               size = width * act->height;
+               size = width * ALIGN(act->height, 8);
        } else {
                aspeed_video_write(video, VE_CAP_WINDOW,
                                   act->width << 16 | act->height);