drivers/staging/media/atomisp/pci/isp/kernels/eed1_8/ia_css_eed1_8.host.c

Source file repositories/reference/linux-study-clean/drivers/staging/media/atomisp/pci/isp/kernels/eed1_8/ia_css_eed1_8.host.c

File Facts

System
Linux kernel
Corpus path
drivers/staging/media/atomisp/pci/isp/kernels/eed1_8/ia_css_eed1_8.host.c
Extension
.c
Size
10561 bytes
Lines
324
Domain
Driver Families
Bucket
drivers/staging
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

// SPDX-License-Identifier: GPL-2.0
/*
 * Support for Intel Camera Imaging ISP subsystem.
 * Copyright (c) 2015, Intel Corporation.
 */

#ifndef IA_CSS_NO_DEBUG
#include "ia_css_debug.h"
#endif

#include "type_support.h"
#include "assert_support.h"
#include "math_support.h" /* for min and max */

#include "ia_css_eed1_8.host.h"

/* WARNING1: Number of inv points should be less or equal to 16,
 * due to implementation limitation. See kernel design document
 * for more details.
 * WARNING2: Do not modify the number of inv points without correcting
 * the EED1_8 kernel implementation assumptions.
 */
#define NUMBER_OF_CHGRINV_POINTS 15
#define NUMBER_OF_TCINV_POINTS 9
#define NUMBER_OF_FCINV_POINTS 9

static const s16 chgrinv_x[NUMBER_OF_CHGRINV_POINTS] = {
	0, 16, 64, 144, 272, 448, 672, 976,
	1376, 1888, 2528, 3312, 4256, 5376, 6688
};

static const s16 chgrinv_a[NUMBER_OF_CHGRINV_POINTS] = {
	-7171, -256, -29, -3456, -1071, -475, -189, -102,
	    -48, -38, -10, -9, -7, -6, 0
    };

static const s16 chgrinv_b[NUMBER_OF_CHGRINV_POINTS] = {
	8191, 1021, 256, 114, 60, 37, 24, 17,
	12, 9, 6, 5, 4, 3, 2
};

static const s16 chgrinv_c[NUMBER_OF_CHGRINV_POINTS] = {
	1, 1, 1, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0
};

static const s16 tcinv_x[NUMBER_OF_TCINV_POINTS] = {
	0, 4, 11, 23, 42, 68, 102, 148, 205
};

static const s16 tcinv_a[NUMBER_OF_TCINV_POINTS] = {
	-6364, -631, -126, -34, -13, -6, -4452, -2156, 0
    };

static const s16 tcinv_b[NUMBER_OF_TCINV_POINTS] = {
	8191, 1828, 726, 352, 197, 121, 80, 55, 40
};

static const s16 tcinv_c[NUMBER_OF_TCINV_POINTS] = {
	1, 1, 1, 1, 1, 1, 0, 0, 0
};

static const s16 fcinv_x[NUMBER_OF_FCINV_POINTS] = {
	0, 80, 216, 456, 824, 1344, 2040, 2952, 4096
};

static const s16 fcinv_a[NUMBER_OF_FCINV_POINTS] = {
	-5244, -486, -86, -2849, -961, -400, -180, -86, 0
    };

static const s16 fcinv_b[NUMBER_OF_FCINV_POINTS] = {
	8191, 1637, 607, 287, 159, 98, 64, 44, 32
};

static const s16 fcinv_c[NUMBER_OF_FCINV_POINTS] = {
	1, 1, 1, 0, 0, 0, 0, 0, 0
};

void
ia_css_eed1_8_vmem_encode(
    struct eed1_8_vmem_params *to,
    const struct ia_css_eed1_8_config *from,
    size_t size)
{
	unsigned int i, j, base;
	const unsigned int total_blocks = 4;
	const unsigned int shuffle_block = 16;

	(void)size;

Annotation

Implementation Notes