kodi
ConvolutionKernels.h
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "cores/VideoSettings.h"
12 
13 #include <stdint.h>
14 
16 {
17  public:
18  CConvolutionKernel(ESCALINGMETHOD method, int size);
20 
21  int GetSize() { return m_size; }
22  float* GetFloatPixels() { return m_floatpixels; }
23  uint8_t* GetIntFractPixels() { return m_intfractpixels; }
24  uint8_t* GetUint8Pixels() { return m_uint8pixels; }
25 
26  private:
27  CConvolutionKernel(const CConvolutionKernel&) = delete;
28  CConvolutionKernel& operator=(const CConvolutionKernel&) = delete;
29  void Lanczos2();
30  void Lanczos3Fast();
31  void Lanczos3();
32  void Spline36Fast();
33  void Spline36();
34  void Bicubic(double B, double C);
35 
36  static double LanczosWeight(double x, double radius);
37  static double Spline36Weight(double x);
38  static double BicubicWeight(double x, double B, double C);
39 
40  void ToIntFract();
41  void ToUint8();
42 
43  int m_size;
44  float* m_floatpixels;
45  uint8_t* m_intfractpixels;
46  uint8_t* m_uint8pixels;
47 };
Definition: ConvolutionKernels.h:15