linux/drivers/media/platform/verisilicon/hantro_g2_vp9_dec.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Hantro VP9 codec driver
 *
 * Copyright (C) 2021 Collabora Ltd.
 */
#include "media/videobuf2-core.h"
#include "media/videobuf2-dma-contig.h"
#include "media/videobuf2-v4l2.h"
#include <linux/kernel.h>
#include <linux/vmalloc.h>
#include <media/v4l2-mem2mem.h>
#include <media/v4l2-vp9.h>

#include "hantro.h"
#include "hantro_vp9.h"
#include "hantro_g2_regs.h"

enum hantro_ref_frames {};

static int start_prepare_run(struct hantro_ctx *ctx, const struct v4l2_ctrl_vp9_frame **dec_params)
{}

static struct hantro_decoded_buffer *
get_ref_buf(struct hantro_ctx *ctx, struct vb2_v4l2_buffer *dst, u64 timestamp)
{}

static void update_dec_buf_info(struct hantro_decoded_buffer *buf,
				const struct v4l2_ctrl_vp9_frame *dec_params)
{}

static void update_ctx_cur_info(struct hantro_vp9_dec_hw_ctx *vp9_ctx,
				struct hantro_decoded_buffer *buf,
				const struct v4l2_ctrl_vp9_frame *dec_params)
{}

static void config_output(struct hantro_ctx *ctx,
			  struct hantro_decoded_buffer *dst,
			  const struct v4l2_ctrl_vp9_frame *dec_params)
{}

struct hantro_vp9_ref_reg {};

static void config_ref(struct hantro_ctx *ctx,
		       struct hantro_decoded_buffer *dst,
		       const struct hantro_vp9_ref_reg *ref_reg,
		       const struct v4l2_ctrl_vp9_frame *dec_params,
		       u64 ref_ts)
{}

static void config_ref_registers(struct hantro_ctx *ctx,
				 const struct v4l2_ctrl_vp9_frame *dec_params,
				 struct hantro_decoded_buffer *dst,
				 struct hantro_decoded_buffer *mv_ref)
{}

static void recompute_tile_info(unsigned short *tile_info, unsigned int tiles, unsigned int sbs)
{}

static void
recompute_tile_rc_info(struct hantro_ctx *ctx,
		       unsigned int tile_r, unsigned int tile_c,
		       unsigned int sbs_r, unsigned int sbs_c)
{}

static inline unsigned int first_tile_row(unsigned int tile_r, unsigned int sbs_r)
{}

static void
fill_tile_info(struct hantro_ctx *ctx,
	       unsigned int tile_r, unsigned int tile_c,
	       unsigned int sbs_r, unsigned int sbs_c,
	       unsigned short *tile_mem)
{}

static void
config_tiles(struct hantro_ctx *ctx,
	     const struct v4l2_ctrl_vp9_frame *dec_params,
	     struct hantro_decoded_buffer *dst)
{}

static void
update_feat_and_flag(struct hantro_vp9_dec_hw_ctx *vp9_ctx,
		     const struct v4l2_vp9_segmentation *seg,
		     unsigned int feature,
		     unsigned int segid)
{}

static inline s16 clip3(s16 x, s16 y, s16 z)
{}

static s16 feat_val_clip3(s16 feat_val, s16 feature_data, bool absolute, u8 clip)
{}

static void config_segment(struct hantro_ctx *ctx, const struct v4l2_ctrl_vp9_frame *dec_params)
{}

static void config_loop_filter(struct hantro_ctx *ctx, const struct v4l2_ctrl_vp9_frame *dec_params)
{}

static void config_picture_dimensions(struct hantro_ctx *ctx, struct hantro_decoded_buffer *dst)
{}

static void
config_bit_depth(struct hantro_ctx *ctx, const struct v4l2_ctrl_vp9_frame *dec_params)
{}

static inline bool is_lossless(const struct v4l2_vp9_quantization *quant)
{}

static void
config_quant(struct hantro_ctx *ctx, const struct v4l2_ctrl_vp9_frame *dec_params)
{}

static u32
hantro_interp_filter_from_v4l2(unsigned int interpolation_filter)
{}

static void
config_others(struct hantro_ctx *ctx, const struct v4l2_ctrl_vp9_frame *dec_params,
	      bool intra_only, bool resolution_change)
{}

static void
config_compound_reference(struct hantro_ctx *ctx,
			  const struct v4l2_ctrl_vp9_frame *dec_params)
{}

#define INNER_LOOP

static void config_probs(struct hantro_ctx *ctx, const struct v4l2_ctrl_vp9_frame *dec_params)
{}

static void config_counts(struct hantro_ctx *ctx)
{}

static void config_seg_map(struct hantro_ctx *ctx,
			   const struct v4l2_ctrl_vp9_frame *dec_params,
			   bool intra_only, bool update_map)
{}

static void
config_source(struct hantro_ctx *ctx, const struct v4l2_ctrl_vp9_frame *dec_params,
	      struct vb2_v4l2_buffer *vb2_src)
{}

static void
config_registers(struct hantro_ctx *ctx, const struct v4l2_ctrl_vp9_frame *dec_params,
		 struct vb2_v4l2_buffer *vb2_src, struct vb2_v4l2_buffer *vb2_dst)
{}

int hantro_g2_vp9_dec_run(struct hantro_ctx *ctx)
{}

#define copy_tx_and_skip(p1, p2)

void hantro_g2_vp9_dec_done(struct hantro_ctx *ctx)
{}