FFmpeg
Loading...
Searching...
No Matches
cbrt_data.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 Reimar Döffinger <Reimar.Doeffinger@gmx.de>
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#ifndef AVCODEC_CBRT_DATA_H
22#define AVCODEC_CBRT_DATA_H
23
24#include <stdint.h>
25
26#define LUT_SIZE (1 << 13)
27
28#ifndef BUILD_TABLES
29#include "config.h"
30#define BUILD_TABLES !CONFIG_HARDCODED_TABLES
31#endif
32
33#if !BUILD_TABLES
34#define ff_cbrt_tableinit_fixed()
35#define ff_cbrt_tableinit()
36extern const uint32_t ff_cbrt_tab[LUT_SIZE];
37extern const uint32_t ff_cbrt_tab_fixed[LUT_SIZE];
38#else
39void ff_cbrt_tableinit(void);
41
42#define TMP_LUT_SIZE (LUT_SIZE / 2)
43/**
44 * Creates a LUT (of doubles) for the powers of
45 * the odd integers: tmp_lut[idx] will be set to (2 * idx + 1)^{4/3}.
46 */
47void ff_cbrt_dbl_tableinit(double tmp_lut[TMP_LUT_SIZE]);
48
49extern union CBRT {
50 uint32_t cbrt_tab[LUT_SIZE];
51 double tmp[TMP_LUT_SIZE];
52} ff_cbrt_tab_internal, ff_cbrt_tab_internal_fixed;
53
54#define ff_cbrt_tab ff_cbrt_tab_internal.cbrt_tab
55#define ff_cbrt_tab_fixed ff_cbrt_tab_internal_fixed.cbrt_tab
56#endif
57
58#endif
#define LUT_SIZE
Definition bgmc.c:40
const uint32_t ff_cbrt_tab_fixed[LUT_SIZE]
#define ff_cbrt_tableinit()
Definition cbrt_data.h:35
#define ff_cbrt_tableinit_fixed()
Definition cbrt_data.h:34
const uint32_t ff_cbrt_tab[LUT_SIZE]
#define CBRT(x)
av_cold void ff_cbrt_dbl_tableinit(double tmp_lut[TMP_LUT_SIZE])
static uint8_t tmp[40]
Definition aes_ctr.c:52