#include <linux/module.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/font.h>
#include <linux/mutex.h>
#include <linux/videodev2.h>
#include <linux/kthread.h>
#include <linux/freezer.h>
#include <linux/random.h>
#include <linux/v4l2-dv-timings.h>
#include <linux/jiffies.h>
#include <asm/div64.h>
#include <media/videobuf2-vmalloc.h>
#include <media/v4l2-dv-timings.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-fh.h>
#include <media/v4l2-event.h>
#include <media/v4l2-rect.h>
#include "vivid-core.h"
#include "vivid-vid-common.h"
#include "vivid-vid-cap.h"
#include "vivid-vid-out.h"
#include "vivid-radio-common.h"
#include "vivid-radio-rx.h"
#include "vivid-radio-tx.h"
#include "vivid-sdr-cap.h"
#include "vivid-vbi-cap.h"
#include "vivid-vbi-out.h"
#include "vivid-osd.h"
#include "vivid-ctrls.h"
#include "vivid-kthread-cap.h"
#include "vivid-meta-cap.h"
static inline v4l2_std_id vivid_get_std_cap(const struct vivid_dev *dev)
{ … }
static void copy_pix(struct vivid_dev *dev, int win_y, int win_x,
u16 *cap, const u16 *osd)
{ … }
static void blend_line(struct vivid_dev *dev, unsigned y_offset, unsigned x_offset,
u8 *vcapbuf, const u8 *vosdbuf,
unsigned width, unsigned pixsize)
{ … }
static void scale_line(const u8 *src, u8 *dst, unsigned srcw, unsigned dstw, unsigned twopixsize)
{ … }
static void vivid_precalc_copy_rects(struct vivid_dev *dev, struct vivid_dev *out_dev)
{ … }
static void *plane_vaddr(struct tpg_data *tpg, struct vivid_buffer *buf,
unsigned p, unsigned bpl[TPG_MAX_PLANES], unsigned h)
{ … }
static noinline_for_stack int vivid_copy_buffer(struct vivid_dev *dev,
struct vivid_dev *out_dev, unsigned p,
u8 *vcapbuf, struct vivid_buffer *vid_cap_buf)
{ … }
static void vivid_fillbuff(struct vivid_dev *dev, struct vivid_buffer *buf)
{ … }
static void vivid_cap_update_frame_period(struct vivid_dev *dev)
{ … }
static noinline_for_stack void vivid_thread_vid_cap_tick(struct vivid_dev *dev,
int dropped_bufs)
{ … }
static int vivid_thread_vid_cap(void *data)
{ … }
static void vivid_grab_controls(struct vivid_dev *dev, bool grab)
{ … }
int vivid_start_generating_vid_cap(struct vivid_dev *dev, bool *pstreaming)
{ … }
void vivid_stop_generating_vid_cap(struct vivid_dev *dev, bool *pstreaming)
{ … }