linux/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateful.c

// SPDX-License-Identifier: GPL-2.0

#include <media/v4l2-event.h>
#include <media/v4l2-mem2mem.h>
#include <media/videobuf2-dma-contig.h>

#include "mtk_vcodec_dec.h"
#include "mtk_vcodec_dec_pm.h"
#include "vdec_drv_if.h"

static struct mtk_video_fmt mtk_video_formats[] =;

static const unsigned int num_supported_formats =;

#define DEFAULT_OUT_FMT_IDX
#define DEFAULT_CAP_FMT_IDX

/*
 * This function tries to clean all display buffers, the buffers will return
 * in display order.
 * Note the buffers returned from codec driver may still be in driver's
 * reference list.
 */
static struct vb2_buffer *get_display_buffer(struct mtk_vcodec_dec_ctx *ctx)
{}

/*
 * This function tries to clean all capture buffers that are not used as
 * reference buffers by codec driver any more
 * In this case, we need re-queue buffer to vb2 buffer if user space
 * already returns this buffer to v4l2 or this buffer is just the output of
 * previous sps/pps/resolution change decode, or do nothing if user
 * space still owns this buffer
 */
static struct vb2_buffer *get_free_buffer(struct mtk_vcodec_dec_ctx *ctx)
{}

static void clean_display_buffer(struct mtk_vcodec_dec_ctx *ctx)
{}

static void clean_free_buffer(struct mtk_vcodec_dec_ctx *ctx)
{}

static void mtk_vdec_queue_res_chg_event(struct mtk_vcodec_dec_ctx *ctx)
{}

static int mtk_vdec_flush_decoder(struct mtk_vcodec_dec_ctx *ctx)
{}

static void mtk_vdec_update_fmt(struct mtk_vcodec_dec_ctx *ctx,
				unsigned int pixelformat)
{}

static int mtk_vdec_pic_info_update(struct mtk_vcodec_dec_ctx *ctx)
{}

static void mtk_vdec_worker(struct work_struct *work)
{}

static void vb2ops_vdec_stateful_buf_queue(struct vb2_buffer *vb)
{}

static int mtk_vdec_g_v_ctrl(struct v4l2_ctrl *ctrl)
{}

static const struct v4l2_ctrl_ops mtk_vcodec_dec_ctrl_ops =;

static int mtk_vcodec_dec_ctrls_setup(struct mtk_vcodec_dec_ctx *ctx)
{}

static void mtk_init_vdec_params(struct mtk_vcodec_dec_ctx *ctx)
{}

static struct vb2_ops mtk_vdec_frame_vb2_ops =;

const struct mtk_vcodec_dec_pdata mtk_vdec_8173_pdata =;