temnick's picture
Initial content
f724cf3
//
// -----------------------------------------------------------------------------
// The proprietary software and information contained in this file is
// confidential and may only be used by an authorized person under a valid
// licensing agreement from Arm Limited or its affiliates.
//
// Copyright (C) 2025. Arm Limited or its affiliates. All rights reserved.
//
// This entire notice must be reproduced on all copies of this file and
// copies of this file may only be made by an authorized person under a valid
// licensing agreement from Arm Limited or its affiliates.
// -----------------------------------------------------------------------------
//
#ifndef NSS_KERNEL_LUT
#define NSS_KERNEL_LUT
#include "typedefs.h"
struct KernelTile {
int16_t4 dy;
int16_t4 dx;
};
// Define actual scale value based on mode
#if SCALE_MODE == SCALE_2_0X
#define CENTER_TAP 0
#define NUM_PATTERNS 4
const KernelTile kernelLUT[NUM_PATTERNS] = {
{
// Pattern 0:
// Taps: 0, 2, 8, 10
// Grid:
// [● · ● ·]
// [· · · ·]
// [● · ● ·]
// [· · · ·]
int16_t4(-1, -1, +1, +1),
int16_t4(-1, +1, -1, +1)
},
{
// Pattern 1:
// Taps: 4, 6, 12, 14
// Grid:
// [· · · ·]
// [● · ● ·]
// [· · · ·]
// [● · ● ·]
int16_t4(-1, -1, +1, +1),
int16_t4(+0, +2, +0, +2)
},
{
// Pattern 2:
// Taps: 1, 3, 9, 11
// Grid:
// [· ● · ●]
// [· · · ·]
// [· ● · ●]
// [· · · ·]
int16_t4(+0, +0, +2, +2),
int16_t4(-1, +1, -1, +1)
},
{
// Pattern 3:
// Taps: 5, 7, 13, 15
// Grid:
// [· · · ·]
// [· ● · ●]
// [· · · ·]
// [· ● · ●]
int16_t4( 0, +0, +2, +2), // center-aligned
int16_t4( 0, +2, +0, +2)
}
};
#else
#error "Unsupported SCALE_MODE"
#endif
#endif //NSS_KERNEL_LUT