#include "wave5-helper.h"
#define VPU_ENC_DEV_NAME …
#define VPU_ENC_DRV_NAME …
static const struct vpu_format enc_fmt_list[FMT_TYPES][MAX_FMTS] = …;
static int switch_state(struct vpu_instance *inst, enum vpu_instance_state state)
{ … }
static void wave5_update_pix_fmt(struct v4l2_pix_format_mplane *pix_mp, unsigned int width,
unsigned int height)
{ … }
static int start_encode(struct vpu_instance *inst, u32 *fail_res)
{ … }
static void wave5_vpu_enc_finish_encode(struct vpu_instance *inst)
{ … }
static int wave5_vpu_enc_querycap(struct file *file, void *fh, struct v4l2_capability *cap)
{ … }
static int wave5_vpu_enc_enum_framesizes(struct file *f, void *fh, struct v4l2_frmsizeenum *fsize)
{ … }
static int wave5_vpu_enc_enum_fmt_cap(struct file *file, void *fh, struct v4l2_fmtdesc *f)
{ … }
static int wave5_vpu_enc_try_fmt_cap(struct file *file, void *fh, struct v4l2_format *f)
{ … }
static int wave5_vpu_enc_s_fmt_cap(struct file *file, void *fh, struct v4l2_format *f)
{ … }
static int wave5_vpu_enc_g_fmt_cap(struct file *file, void *fh, struct v4l2_format *f)
{ … }
static int wave5_vpu_enc_enum_fmt_out(struct file *file, void *fh, struct v4l2_fmtdesc *f)
{ … }
static int wave5_vpu_enc_try_fmt_out(struct file *file, void *fh, struct v4l2_format *f)
{ … }
static int wave5_vpu_enc_s_fmt_out(struct file *file, void *fh, struct v4l2_format *f)
{ … }
static int wave5_vpu_enc_g_selection(struct file *file, void *fh, struct v4l2_selection *s)
{ … }
static int wave5_vpu_enc_s_selection(struct file *file, void *fh, struct v4l2_selection *s)
{ … }
static int wave5_vpu_enc_encoder_cmd(struct file *file, void *fh, struct v4l2_encoder_cmd *ec)
{ … }
static int wave5_vpu_enc_g_parm(struct file *file, void *fh, struct v4l2_streamparm *a)
{ … }
static int wave5_vpu_enc_s_parm(struct file *file, void *fh, struct v4l2_streamparm *a)
{ … }
static const struct v4l2_ioctl_ops wave5_vpu_enc_ioctl_ops = …;
static int wave5_vpu_enc_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static const struct v4l2_ctrl_ops wave5_vpu_enc_ctrl_ops = …;
static int wave5_vpu_enc_queue_setup(struct vb2_queue *q, unsigned int *num_buffers,
unsigned int *num_planes, unsigned int sizes[],
struct device *alloc_devs[])
{ … }
static void wave5_vpu_enc_buf_queue(struct vb2_buffer *vb)
{ … }
static void wave5_set_enc_openparam(struct enc_open_param *open_param,
struct vpu_instance *inst)
{ … }
static int initialize_sequence(struct vpu_instance *inst)
{ … }
static int prepare_fb(struct vpu_instance *inst)
{ … }
static int wave5_vpu_enc_start_streaming(struct vb2_queue *q, unsigned int count)
{ … }
static void streamoff_output(struct vpu_instance *inst, struct vb2_queue *q)
{ … }
static void streamoff_capture(struct vpu_instance *inst, struct vb2_queue *q)
{ … }
static void wave5_vpu_enc_stop_streaming(struct vb2_queue *q)
{ … }
static const struct vb2_ops wave5_vpu_enc_vb2_ops = …;
static void wave5_set_default_format(struct v4l2_pix_format_mplane *src_fmt,
struct v4l2_pix_format_mplane *dst_fmt)
{ … }
static int wave5_vpu_enc_queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_queue *dst_vq)
{ … }
static const struct vpu_instance_ops wave5_vpu_enc_inst_ops = …;
static void wave5_vpu_enc_device_run(void *priv)
{ … }
static int wave5_vpu_enc_job_ready(void *priv)
{ … }
static const struct v4l2_m2m_ops wave5_vpu_enc_m2m_ops = …;
static int wave5_vpu_open_enc(struct file *filp)
{ … }
static int wave5_vpu_enc_release(struct file *filp)
{ … }
static const struct v4l2_file_operations wave5_vpu_enc_fops = …;
int wave5_vpu_enc_register_device(struct vpu_device *dev)
{ … }
void wave5_vpu_enc_unregister_device(struct vpu_device *dev)
{ … }