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

// SPDX-License-Identifier: GPL-2.0-only OR Apache-2.0

#include "rockchip_av1_filmgrain.h"

static const s32 gaussian_sequence[2048] =;

static inline s32 clamp(s32 value, s32 low, s32 high)
{}

static inline s32 round_power_of_two(const s32 val, s32 n)
{}

static void rockchip_av1_init_random_generator(u8 luma_num, u16 seed,
					       u16 *random_register)
{}

static inline void rockchip_av1_update_random_register(u16 *random_register)
{}

static inline s32 rockchip_av1_get_random_number(u16 random_register)
{}

void rockchip_av1_generate_luma_grain_block(s32 (*luma_grain_block)[73][82],
					    s32 bitdepth,
					    u8 num_y_points,
					    s32 grain_scale_shift,
					    s32 ar_coeff_lag,
					    s32 (*ar_coeffs_y)[24],
					    s32 ar_coeff_shift,
					    s32 grain_min,
					    s32 grain_max,
					    u16 random_seed)
{}

// Calculate chroma grain noise once per frame
void rockchip_av1_generate_chroma_grain_block(s32 (*luma_grain_block)[73][82],
					      s32 (*cb_grain_block)[38][44],
					      s32 (*cr_grain_block)[38][44],
					      s32 bitdepth,
					      u8 num_y_points,
					      u8 num_cb_points,
					      u8 num_cr_points,
					      s32 grain_scale_shift,
					      s32 ar_coeff_lag,
					      s32 (*ar_coeffs_cb)[25],
					      s32 (*ar_coeffs_cr)[25],
					      s32 ar_coeff_shift,
					      s32 grain_min,
					      s32 grain_max,
					      u8 chroma_scaling_from_luma,
					      u16 random_seed)
{}