linux/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * linux/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_enc.c
 *
 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
 *		http://www.samsung.com/
 *
 * Jeongtae Park	<[email protected]>
 * Kamil Debski		<[email protected]>
 */

#include <linux/clk.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/sched.h>
#include <linux/videodev2.h>
#include <media/v4l2-event.h>
#include <linux/workqueue.h>
#include <media/v4l2-ctrls.h>
#include <media/videobuf2-v4l2.h>
#include "s5p_mfc_common.h"
#include "s5p_mfc_ctrl.h"
#include "s5p_mfc_debug.h"
#include "s5p_mfc_enc.h"
#include "s5p_mfc_intr.h"
#include "s5p_mfc_opr.h"

#define DEF_SRC_FMT_ENC
#define DEF_DST_FMT_ENC

static const struct s5p_mfc_fmt formats[] =;

#define NUM_FORMATS
static const struct s5p_mfc_fmt *find_format(struct v4l2_format *f, unsigned int t)
{}

static struct mfc_control controls[] =;

#define NUM_CTRLS
static const char * const *mfc51_get_menu(u32 id)
{}

static int s5p_mfc_ctx_ready(struct s5p_mfc_ctx *ctx)
{}

static void cleanup_ref_queue(struct s5p_mfc_ctx *ctx)
{}

static int enc_pre_seq_start(struct s5p_mfc_ctx *ctx)
{}

static int enc_post_seq_start(struct s5p_mfc_ctx *ctx)
{}

static int enc_pre_frame_start(struct s5p_mfc_ctx *ctx)
{}

static int enc_post_frame_start(struct s5p_mfc_ctx *ctx)
{}

static const struct s5p_mfc_codec_ops encoder_codec_ops =;

/* Query capabilities of the device */
static int vidioc_querycap(struct file *file, void *priv,
			   struct v4l2_capability *cap)
{}

static int vidioc_enum_fmt(struct file *file, struct v4l2_fmtdesc *f,
							bool out)
{}

static int vidioc_enum_fmt_vid_cap(struct file *file, void *pirv,
				   struct v4l2_fmtdesc *f)
{}

static int vidioc_enum_fmt_vid_out(struct file *file, void *priv,
				   struct v4l2_fmtdesc *f)
{}

static int vidioc_g_fmt(struct file *file, void *priv, struct v4l2_format *f)
{}

static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f)
{}

static int vidioc_s_fmt(struct file *file, void *priv, struct v4l2_format *f)
{}

static int vidioc_reqbufs(struct file *file, void *priv,
					  struct v4l2_requestbuffers *reqbufs)
{}

static int vidioc_querybuf(struct file *file, void *priv,
						   struct v4l2_buffer *buf)
{}

/* Queue a buffer */
static int vidioc_qbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
{}

/* Dequeue a buffer */
static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
{}

/* Export DMA buffer */
static int vidioc_expbuf(struct file *file, void *priv,
	struct v4l2_exportbuffer *eb)
{}

/* Stream on */
static int vidioc_streamon(struct file *file, void *priv,
			   enum v4l2_buf_type type)
{}

/* Stream off, which equals to a pause */
static int vidioc_streamoff(struct file *file, void *priv,
			    enum v4l2_buf_type type)
{}

static inline int h264_level(enum v4l2_mpeg_video_h264_level lvl)
{}

static inline int mpeg4_level(enum v4l2_mpeg_video_mpeg4_level lvl)
{}

static inline int hevc_level(enum v4l2_mpeg_video_hevc_level lvl)
{}

static inline int vui_sar_idc(enum v4l2_mpeg_video_h264_vui_sar_idc sar)
{}

/*
 * Update range of all HEVC quantization parameter controls that depend on the
 * V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP, V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP controls.
 */
static void __enc_update_hevc_qp_ctrls_range(struct s5p_mfc_ctx *ctx,
					     int min, int max)
{}

static int s5p_mfc_enc_s_ctrl(struct v4l2_ctrl *ctrl)
{}

static int s5p_mfc_enc_g_v_ctrl(struct v4l2_ctrl *ctrl)
{}

static const struct v4l2_ctrl_ops s5p_mfc_enc_ctrl_ops =;

static int vidioc_s_parm(struct file *file, void *priv,
			 struct v4l2_streamparm *a)
{}

static int vidioc_g_parm(struct file *file, void *priv,
			 struct v4l2_streamparm *a)
{}

static int vidioc_encoder_cmd(struct file *file, void *priv,
			      struct v4l2_encoder_cmd *cmd)
{}

static int vidioc_subscribe_event(struct v4l2_fh *fh,
				  const struct v4l2_event_subscription *sub)
{}

static const struct v4l2_ioctl_ops s5p_mfc_enc_ioctl_ops =;

static int check_vb_with_fmt(const struct s5p_mfc_fmt *fmt, struct vb2_buffer *vb)
{}

static int s5p_mfc_queue_setup(struct vb2_queue *vq,
			unsigned int *buf_count, unsigned int *plane_count,
			unsigned int psize[], struct device *alloc_devs[])
{}

static int s5p_mfc_buf_init(struct vb2_buffer *vb)
{}

static int s5p_mfc_buf_prepare(struct vb2_buffer *vb)
{}

static int s5p_mfc_start_streaming(struct vb2_queue *q, unsigned int count)
{}

static void s5p_mfc_stop_streaming(struct vb2_queue *q)
{}

static void s5p_mfc_buf_queue(struct vb2_buffer *vb)
{}

static const struct vb2_ops s5p_mfc_enc_qops =;

const struct s5p_mfc_codec_ops *get_enc_codec_ops(void)
{}

const struct vb2_ops *get_enc_queue_ops(void)
{}

const struct v4l2_ioctl_ops *get_enc_v4l2_ioctl_ops(void)
{}

#define IS_MFC51_PRIV(x)

int s5p_mfc_enc_ctrls_setup(struct s5p_mfc_ctx *ctx)
{}

void s5p_mfc_enc_ctrls_delete(struct s5p_mfc_ctx *ctx)
{}

void s5p_mfc_enc_init(struct s5p_mfc_ctx *ctx)
{}