FFmpeg
Loading...
Searching...
No Matches
snowdata.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2004 Michael Niedermayer <michaelni@gmx.at>
3 * Copyright (C) 2006 Robert Edele <yartrebo@earthlink.net>
4 *
5 * This file is part of FFmpeg.
6 *
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22#ifndef AVCODEC_SNOWDATA_H
23#define AVCODEC_SNOWDATA_H
24
25#include "snow.h"
27
28DECLARE_ALIGNED(16, static const uint8_t, obmc32)[1024]={
29 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
30 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 0,
31 0, 1, 2, 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 8, 9, 10, 10, 9, 8, 8, 7, 7, 6, 5, 5, 4, 3, 3, 2, 2, 1, 0,
32 0, 1, 2, 3, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, 14, 13, 12, 11, 10, 9, 8, 7, 7, 6, 5, 4, 3, 2, 1, 0,
33 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 17, 16, 15, 14, 13, 12, 11, 10, 8, 7, 6, 5, 4, 3, 2, 1,
34 1, 2, 3, 5, 6, 8, 9, 10, 12, 13, 14, 16, 17, 19, 20, 21, 21, 20, 19, 17, 16, 14, 13, 12, 10, 9, 8, 6, 5, 3, 2, 1,
35 1, 2, 4, 6, 7, 9, 11, 12, 14, 15, 17, 19, 20, 22, 24, 25, 25, 24, 22, 20, 19, 17, 15, 14, 12, 11, 9, 7, 6, 4, 2, 1,
36 1, 3, 5, 7, 8, 10, 12, 14, 16, 18, 20, 22, 23, 25, 27, 29, 29, 27, 25, 23, 22, 20, 18, 16, 14, 12, 10, 8, 7, 5, 3, 1,
37 1, 3, 5, 7, 10, 12, 14, 16, 18, 20, 22, 24, 27, 29, 31, 33, 33, 31, 29, 27, 24, 22, 20, 18, 16, 14, 12, 10, 7, 5, 3, 1,
38 1, 4, 6, 8, 11, 13, 15, 18, 20, 23, 25, 27, 30, 32, 34, 37, 37, 34, 32, 30, 27, 25, 23, 20, 18, 15, 13, 11, 8, 6, 4, 1,
39 1, 4, 7, 9, 12, 14, 17, 20, 22, 25, 28, 30, 33, 35, 38, 41, 41, 38, 35, 33, 30, 28, 25, 22, 20, 17, 14, 12, 9, 7, 4, 1,
40 1, 4, 7, 10, 13, 16, 19, 22, 24, 27, 30, 33, 36, 39, 42, 45, 45, 42, 39, 36, 33, 30, 27, 24, 22, 19, 16, 13, 10, 7, 4, 1,
41 2, 5, 8, 11, 14, 17, 20, 23, 27, 30, 33, 36, 39, 42, 45, 48, 48, 45, 42, 39, 36, 33, 30, 27, 23, 20, 17, 14, 11, 8, 5, 2,
42 2, 5, 8, 12, 15, 19, 22, 25, 29, 32, 35, 39, 42, 46, 49, 52, 52, 49, 46, 42, 39, 35, 32, 29, 25, 22, 19, 15, 12, 8, 5, 2,
43 2, 5, 9, 13, 16, 20, 24, 27, 31, 34, 38, 42, 45, 49, 53, 56, 56, 53, 49, 45, 42, 38, 34, 31, 27, 24, 20, 16, 13, 9, 5, 2,
44 2, 6, 10, 14, 17, 21, 25, 29, 33, 37, 41, 45, 48, 52, 56, 60, 60, 56, 52, 48, 45, 41, 37, 33, 29, 25, 21, 17, 14, 10, 6, 2,
45 2, 6, 10, 14, 17, 21, 25, 29, 33, 37, 41, 45, 48, 52, 56, 60, 60, 56, 52, 48, 45, 41, 37, 33, 29, 25, 21, 17, 14, 10, 6, 2,
46 2, 5, 9, 13, 16, 20, 24, 27, 31, 34, 38, 42, 45, 49, 53, 56, 56, 53, 49, 45, 42, 38, 34, 31, 27, 24, 20, 16, 13, 9, 5, 2,
47 2, 5, 8, 12, 15, 19, 22, 25, 29, 32, 35, 39, 42, 46, 49, 52, 52, 49, 46, 42, 39, 35, 32, 29, 25, 22, 19, 15, 12, 8, 5, 2,
48 2, 5, 8, 11, 14, 17, 20, 23, 27, 30, 33, 36, 39, 42, 45, 48, 48, 45, 42, 39, 36, 33, 30, 27, 23, 20, 17, 14, 11, 8, 5, 2,
49 1, 4, 7, 10, 13, 16, 19, 22, 24, 27, 30, 33, 36, 39, 42, 45, 45, 42, 39, 36, 33, 30, 27, 24, 22, 19, 16, 13, 10, 7, 4, 1,
50 1, 4, 7, 9, 12, 14, 17, 20, 22, 25, 28, 30, 33, 35, 38, 41, 41, 38, 35, 33, 30, 28, 25, 22, 20, 17, 14, 12, 9, 7, 4, 1,
51 1, 4, 6, 8, 11, 13, 15, 18, 20, 23, 25, 27, 30, 32, 34, 37, 37, 34, 32, 30, 27, 25, 23, 20, 18, 15, 13, 11, 8, 6, 4, 1,
52 1, 3, 5, 7, 10, 12, 14, 16, 18, 20, 22, 24, 27, 29, 31, 33, 33, 31, 29, 27, 24, 22, 20, 18, 16, 14, 12, 10, 7, 5, 3, 1,
53 1, 3, 5, 7, 8, 10, 12, 14, 16, 18, 20, 22, 23, 25, 27, 29, 29, 27, 25, 23, 22, 20, 18, 16, 14, 12, 10, 8, 7, 5, 3, 1,
54 1, 2, 4, 6, 7, 9, 11, 12, 14, 15, 17, 19, 20, 22, 24, 25, 25, 24, 22, 20, 19, 17, 15, 14, 12, 11, 9, 7, 6, 4, 2, 1,
55 1, 2, 3, 5, 6, 8, 9, 10, 12, 13, 14, 16, 17, 19, 20, 21, 21, 20, 19, 17, 16, 14, 13, 12, 10, 9, 8, 6, 5, 3, 2, 1,
56 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 17, 16, 15, 14, 13, 12, 11, 10, 8, 7, 6, 5, 4, 3, 2, 1,
57 0, 1, 2, 3, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, 14, 13, 12, 11, 10, 9, 8, 7, 7, 6, 5, 4, 3, 2, 1, 0,
58 0, 1, 2, 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 8, 9, 10, 10, 9, 8, 8, 7, 7, 6, 5, 5, 4, 3, 3, 2, 2, 1, 0,
59 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 0,
60 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
61 //error:0.000020
62};
63DECLARE_ALIGNED(16, static const uint8_t, obmc16)[256]={
64 0, 1, 1, 2, 2, 3, 3, 4, 4, 3, 3, 2, 2, 1, 1, 0,
65 1, 2, 4, 5, 7, 8, 10, 11, 11, 10, 8, 7, 5, 4, 2, 1,
66 1, 4, 6, 9, 11, 14, 16, 19, 19, 16, 14, 11, 9, 6, 4, 1,
67 2, 5, 9, 12, 16, 19, 23, 26, 26, 23, 19, 16, 12, 9, 5, 2,
68 2, 7, 11, 16, 20, 25, 29, 34, 34, 29, 25, 20, 16, 11, 7, 2,
69 3, 8, 14, 19, 25, 30, 36, 41, 41, 36, 30, 25, 19, 14, 8, 3,
70 3, 10, 16, 23, 29, 36, 42, 49, 49, 42, 36, 29, 23, 16, 10, 3,
71 4, 11, 19, 26, 34, 41, 49, 56, 56, 49, 41, 34, 26, 19, 11, 4,
72 4, 11, 19, 26, 34, 41, 49, 56, 56, 49, 41, 34, 26, 19, 11, 4,
73 3, 10, 16, 23, 29, 36, 42, 49, 49, 42, 36, 29, 23, 16, 10, 3,
74 3, 8, 14, 19, 25, 30, 36, 41, 41, 36, 30, 25, 19, 14, 8, 3,
75 2, 7, 11, 16, 20, 25, 29, 34, 34, 29, 25, 20, 16, 11, 7, 2,
76 2, 5, 9, 12, 16, 19, 23, 26, 26, 23, 19, 16, 12, 9, 5, 2,
77 1, 4, 6, 9, 11, 14, 16, 19, 19, 16, 14, 11, 9, 6, 4, 1,
78 1, 2, 4, 5, 7, 8, 10, 11, 11, 10, 8, 7, 5, 4, 2, 1,
79 0, 1, 1, 2, 2, 3, 3, 4, 4, 3, 3, 2, 2, 1, 1, 0,
80//error:0.000015
81};
82
83//linear *64
84static const uint8_t obmc8[64]={
85 1, 3, 5, 7, 7, 5, 3, 1,
86 3, 9, 15, 21, 21, 15, 9, 3,
87 5, 15, 25, 35, 35, 25, 15, 5,
88 7, 21, 35, 49, 49, 35, 21, 7,
89 7, 21, 35, 49, 49, 35, 21, 7,
90 5, 15, 25, 35, 35, 25, 15, 5,
91 3, 9, 15, 21, 21, 15, 9, 3,
92 1, 3, 5, 7, 7, 5, 3, 1,
93//error:0.000000
94};
95
96//linear *64
97static const uint8_t obmc4[16]={
98 4, 12, 12, 4,
99 12, 36, 36, 12,
100 12, 36, 36, 12,
101 4, 12, 12, 4,
102//error:0.000000
103};
104
105const int8_t ff_quant3bA[256]={
106 0, 0, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
107 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
108 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
109 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
110 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
111 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
112 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
113 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
114 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
115 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
116 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
117 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
118 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
119 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
120 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
121 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1, 1,-1,
122};
123
124const uint8_t * const ff_obmc_tab[4]= {
126};
127
128/* ff_qexp[i] = lrintf(128 * 2^(i / QROOT)) with QROOT = 32 */
129const uint8_t ff_qexp[QROOT] = {
130 128, 131, 134, 137, 140, 143, 146, 149, 152, 156, 159,
131 162, 166, 170, 173, 177, 181, 185, 189, 193, 197, 202,
132 206, 211, 215, 220, 225, 230, 235, 240, 245, 251,
133};
134
135/* table generated at runtime */
137
138
139#endif /* AVCODEC_SNOW_H */
#define DECLARE_ALIGNED(n, t, v)
Declare a variable that is aligned in memory.
#define QROOT
Definition snow.h:43
const uint8_t ff_qexp[QROOT]
Definition snowdata.h:129
const uint8_t *const ff_obmc_tab[4]
Definition snowdata.h:124
#define MAX_REF_FRAMES
Definition snow.h:46
int ff_scale_mv_ref[MAX_REF_FRAMES][MAX_REF_FRAMES]
Definition snowdata.h:136
const int8_t ff_quant3bA[256]
Definition snowdata.h:105
static const uint8_t obmc32[1024]
Definition snowdata.h:28
static const uint8_t obmc8[64]
Definition snowdata.h:84
static const uint8_t obmc4[16]
Definition snowdata.h:97
static const uint8_t obmc16[256]
Definition snowdata.h:63