2014-07-29 15:10:47 +00:00
|
|
|
#ifndef STRATEGIES_DCT_H_
|
|
|
|
#define STRATEGIES_DCT_H_
|
|
|
|
/*****************************************************************************
|
|
|
|
* This file is part of Kvazaar HEVC encoder.
|
|
|
|
*
|
2015-02-23 11:18:48 +00:00
|
|
|
* Copyright (C) 2013-2015 Tampere University of Technology and others (see
|
2014-07-29 15:10:47 +00:00
|
|
|
* COPYING file).
|
|
|
|
*
|
2015-02-23 11:18:48 +00:00
|
|
|
* Kvazaar is free software: you can redistribute it and/or modify it under
|
|
|
|
* the terms of the GNU Lesser General Public License as published by the
|
|
|
|
* Free Software Foundation; either version 2.1 of the License, or (at your
|
|
|
|
* option) any later version.
|
2014-07-29 15:10:47 +00:00
|
|
|
*
|
2015-02-23 11:18:48 +00:00
|
|
|
* Kvazaar is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
|
|
|
|
* more details.
|
2014-07-29 15:10:47 +00:00
|
|
|
*
|
2015-02-23 11:18:48 +00:00
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with Kvazaar. If not, see <http://www.gnu.org/licenses/>.
|
2014-07-29 15:10:47 +00:00
|
|
|
****************************************************************************/
|
2015-12-17 11:42:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* \ingroup Optimization
|
|
|
|
* \file
|
|
|
|
* Interface for transform functions.
|
|
|
|
*/
|
|
|
|
|
2016-03-30 09:41:37 +00:00
|
|
|
#include "global.h" // IWYU pragma: keep
|
2018-01-12 09:16:01 +00:00
|
|
|
#include "cu.h"
|
2014-07-29 15:10:47 +00:00
|
|
|
|
2014-10-02 13:10:17 +00:00
|
|
|
typedef unsigned (dct_func)(int8_t bitdepth, const int16_t *input, int16_t *output);
|
2014-07-29 15:10:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Declare function pointers.
|
2015-08-26 08:50:27 +00:00
|
|
|
extern dct_func * kvz_fast_forward_dst_4x4;
|
2014-07-29 15:10:47 +00:00
|
|
|
|
2015-08-26 08:50:27 +00:00
|
|
|
extern dct_func * kvz_dct_4x4;
|
|
|
|
extern dct_func * kvz_dct_8x8;
|
|
|
|
extern dct_func * kvz_dct_16x16;
|
|
|
|
extern dct_func * kvz_dct_32x32;
|
2014-07-29 15:10:47 +00:00
|
|
|
|
2015-08-26 08:50:27 +00:00
|
|
|
extern dct_func * kvz_fast_inverse_dst_4x4;
|
2014-07-29 15:10:47 +00:00
|
|
|
|
2015-08-26 08:50:27 +00:00
|
|
|
extern dct_func * kvz_idct_4x4;
|
|
|
|
extern dct_func * kvz_idct_8x8;
|
|
|
|
extern dct_func * kvz_idct_16x16;
|
|
|
|
extern dct_func * kvz_idct_32x32;
|
2014-07-29 15:10:47 +00:00
|
|
|
|
|
|
|
|
2018-10-17 05:56:49 +00:00
|
|
|
extern void(*kvz_emt_dct)(
|
|
|
|
int8_t bitdepth,
|
|
|
|
color_t color,
|
|
|
|
const cu_info_t *tu,
|
|
|
|
int8_t width,
|
|
|
|
const int16_t *input,
|
|
|
|
int16_t *output);
|
|
|
|
extern void(*kvz_emt_idct)(
|
|
|
|
int8_t bitdepth,
|
|
|
|
color_t color,
|
|
|
|
const cu_info_t *tu,
|
|
|
|
int8_t width,
|
|
|
|
const int16_t *input,
|
|
|
|
int16_t *output);
|
|
|
|
|
2015-08-26 08:50:27 +00:00
|
|
|
int kvz_strategy_register_dct(void* opaque, uint8_t bitdepth);
|
2018-01-12 09:16:01 +00:00
|
|
|
dct_func * kvz_get_dct_func(int8_t width, color_t color, cu_type_t type);
|
|
|
|
dct_func * kvz_get_idct_func(int8_t width, color_t color, cu_type_t type);
|
|
|
|
|
2014-07-29 15:10:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
#define STRATEGIES_DCT_EXPORTS \
|
2015-08-26 08:50:27 +00:00
|
|
|
{"fast_forward_dst_4x4", (void**) &kvz_fast_forward_dst_4x4}, \
|
2014-07-29 15:10:47 +00:00
|
|
|
\
|
2015-08-26 08:50:27 +00:00
|
|
|
{"dct_4x4", (void**) &kvz_dct_4x4}, \
|
|
|
|
{"dct_8x8", (void**) &kvz_dct_8x8}, \
|
|
|
|
{"dct_16x16", (void**) &kvz_dct_16x16}, \
|
|
|
|
{"dct_32x32", (void**) &kvz_dct_32x32}, \
|
2014-07-29 15:10:47 +00:00
|
|
|
\
|
2015-08-26 08:50:27 +00:00
|
|
|
{"fast_inverse_dst_4x4", (void**) &kvz_fast_inverse_dst_4x4}, \
|
2014-07-29 15:10:47 +00:00
|
|
|
\
|
2015-08-26 08:50:27 +00:00
|
|
|
{"idct_4x4", (void**)&kvz_idct_4x4}, \
|
|
|
|
{"idct_8x8", (void**)&kvz_idct_8x8}, \
|
|
|
|
{"idct_16x16", (void**)&kvz_idct_16x16}, \
|
|
|
|
{"idct_32x32", (void**)&kvz_idct_32x32}, \
|
2018-10-17 05:56:49 +00:00
|
|
|
{"emt_dct", (void**)&kvz_emt_dct }, \
|
|
|
|
{"emt_idct", (void**)&kvz_emt_idct }, \
|
|
|
|
|
2014-07-29 15:10:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif //STRATEGIES_DCT_H_
|