47163fa8d3
add support for lanczos coefficients which enhaces the quality of scaling down Signed-off-by: Peyton Lee <peytolee@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35361>
21 lines
610 B
C++
21 lines
610 B
C++
/* Copyright 2025 Advanced Micro Devices, Inc.
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
* Authors: AMD
|
|
*
|
|
*/
|
|
|
|
#include "lanczos_adaptor.h"
|
|
#include "lanczosFilterGenerator.h"
|
|
|
|
#define MaxHwNumTabs 8
|
|
#define HwNumPhases 64
|
|
#define HwNumTabsChroma 2
|
|
|
|
void generate_lanczos_coeff(float scaling_ratio, uint32_t hw_tap, uint32_t hw_phases, uint16_t *coeff)
|
|
{
|
|
float filterCoeffs[MaxHwNumTabs * HwNumPhases] = {0};
|
|
|
|
LanczosFilterGenerator::GenerateLanczosCoeff(filterCoeffs, scaling_ratio, hw_tap, hw_phases);
|
|
LanczosFilterGenerator::ConvertScalingCoeffsToUint(coeff, filterCoeffs, hw_tap, hw_phases);
|
|
} |