Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / drivers / staging / media / rpivid / rpivid_video.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Raspberry Pi HEVC driver
4  *
5  * Copyright (C) 2020 Raspberry Pi (Trading) Ltd
6  *
7  * Based on the Cedrus VPU driver, that is:
8  *
9  * Copyright (C) 2016 Florent Revest <florent.revest@free-electrons.com>
10  * Copyright (C) 2018 Paul Kocialkowski <paul.kocialkowski@bootlin.com>
11  * Copyright (C) 2018 Bootlin
12  */
13
14 #ifndef _RPIVID_VIDEO_H_
15 #define _RPIVID_VIDEO_H_
16
17 struct rpivid_format {
18         u32             pixelformat;
19         u32             directions;
20         unsigned int    capabilities;
21 };
22
23 extern const struct v4l2_ioctl_ops rpivid_ioctl_ops;
24
25 int rpivid_queue_init(void *priv, struct vb2_queue *src_vq,
26                       struct vb2_queue *dst_vq);
27
28 size_t rpivid_bit_buf_size(unsigned int w, unsigned int h, unsigned int bits_minus8);
29 size_t rpivid_round_up_size(const size_t x);
30
31 void rpivid_prepare_src_format(struct v4l2_pix_format_mplane *pix_fmt);
32
33 #endif