Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
aom-rav1e
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiph.Org
aom-rav1e
Commits
381d3b8b
Commit
381d3b8b
authored
11 years ago
by
Dmitry Kovalev
Committed by
Gerrit Code Review
11 years ago
Browse files
Options
Downloads
Plain Diff
Merge "vp9_filter.{h, c} cleanup + adding SUBPEL_TAPS constant."
parents
246381fa
d19ac4b6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
vp9/common/vp9_filter.c
+11
-12
11 additions, 12 deletions
vp9/common/vp9_filter.c
vp9/common/vp9_filter.h
+8
-9
8 additions, 9 deletions
vp9/common/vp9_filter.h
with
19 additions
and
21 deletions
vp9/common/vp9_filter.c
+
11
−
12
View file @
381d3b8b
...
@@ -8,14 +8,12 @@
...
@@ -8,14 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
* be found in the AUTHORS file in the root of the source tree.
*/
*/
#include
"vpx_ports/mem.h"
#include
<stdlib.h>
#include
"vp9/common/vp9_filter.h"
#include
"vp9/common/vp9_filter.h"
#include
"vpx_ports/mem.h"
#include
"vp9_rtcd.h"
#include
"vp9/common/vp9_common.h"
DECLARE_ALIGNED
(
256
,
const
int16_t
,
vp9_bilinear_filters
[
SUBPEL_SHIFTS
][
8
])
=
{
DECLARE_ALIGNED
(
256
,
const
int16_t
,
vp9_bilinear_filters
[
SUBPEL_SHIFTS
][
SUBPEL_TAPS
])
=
{
{
0
,
0
,
0
,
128
,
0
,
0
,
0
,
0
},
{
0
,
0
,
0
,
128
,
0
,
0
,
0
,
0
},
{
0
,
0
,
0
,
120
,
8
,
0
,
0
,
0
},
{
0
,
0
,
0
,
120
,
8
,
0
,
0
,
0
},
{
0
,
0
,
0
,
112
,
16
,
0
,
0
,
0
},
{
0
,
0
,
0
,
112
,
16
,
0
,
0
,
0
},
...
@@ -34,8 +32,9 @@ DECLARE_ALIGNED(256, const int16_t, vp9_bilinear_filters[SUBPEL_SHIFTS][8]) = {
...
@@ -34,8 +32,9 @@ DECLARE_ALIGNED(256, const int16_t, vp9_bilinear_filters[SUBPEL_SHIFTS][8]) = {
{
0
,
0
,
0
,
8
,
120
,
0
,
0
,
0
}
{
0
,
0
,
0
,
8
,
120
,
0
,
0
,
0
}
};
};
DECLARE_ALIGNED
(
256
,
const
int16_t
,
vp9_sub_pel_filters_8
[
SUBPEL_SHIFTS
][
8
])
=
{
// Lagrangian interpolation filter
/* Lagrangian interpolation filter */
DECLARE_ALIGNED
(
256
,
const
int16_t
,
vp9_sub_pel_filters_8
[
SUBPEL_SHIFTS
][
SUBPEL_TAPS
])
=
{
{
0
,
0
,
0
,
128
,
0
,
0
,
0
,
0
},
{
0
,
0
,
0
,
128
,
0
,
0
,
0
,
0
},
{
0
,
1
,
-
5
,
126
,
8
,
-
3
,
1
,
0
},
{
0
,
1
,
-
5
,
126
,
8
,
-
3
,
1
,
0
},
{
-
1
,
3
,
-
10
,
122
,
18
,
-
6
,
2
,
0
},
{
-
1
,
3
,
-
10
,
122
,
18
,
-
6
,
2
,
0
},
...
@@ -54,9 +53,9 @@ DECLARE_ALIGNED(256, const int16_t, vp9_sub_pel_filters_8[SUBPEL_SHIFTS][8]) = {
...
@@ -54,9 +53,9 @@ DECLARE_ALIGNED(256, const int16_t, vp9_sub_pel_filters_8[SUBPEL_SHIFTS][8]) = {
{
0
,
1
,
-
3
,
8
,
126
,
-
5
,
1
,
0
}
{
0
,
1
,
-
3
,
8
,
126
,
-
5
,
1
,
0
}
};
};
DECLARE_ALIGNED
(
256
,
const
int16_t
,
vp9_sub_pel_filters_8s
[
SUBPEL_SHIFTS
][
8
])
// DCT based filter
=
{
DECLARE_ALIGNED
(
256
,
const
int16_t
,
/* dct based filter */
vp9_sub_pel_filters_8s
[
SUBPEL_SHIFTS
][
SUBPEL_TAPS
])
=
{
{
0
,
0
,
0
,
128
,
0
,
0
,
0
,
0
},
{
0
,
0
,
0
,
128
,
0
,
0
,
0
,
0
},
{
-
1
,
3
,
-
7
,
127
,
8
,
-
3
,
1
,
0
},
{
-
1
,
3
,
-
7
,
127
,
8
,
-
3
,
1
,
0
},
{
-
2
,
5
,
-
13
,
125
,
17
,
-
6
,
3
,
-
1
},
{
-
2
,
5
,
-
13
,
125
,
17
,
-
6
,
3
,
-
1
},
...
@@ -75,9 +74,9 @@ DECLARE_ALIGNED(256, const int16_t, vp9_sub_pel_filters_8s[SUBPEL_SHIFTS][8])
...
@@ -75,9 +74,9 @@ DECLARE_ALIGNED(256, const int16_t, vp9_sub_pel_filters_8s[SUBPEL_SHIFTS][8])
{
0
,
1
,
-
3
,
8
,
127
,
-
7
,
3
,
-
1
}
{
0
,
1
,
-
3
,
8
,
127
,
-
7
,
3
,
-
1
}
};
};
// freqmultiplier = 0.5
DECLARE_ALIGNED
(
256
,
const
int16_t
,
DECLARE_ALIGNED
(
256
,
const
int16_t
,
vp9_sub_pel_filters_8lp
[
SUBPEL_SHIFTS
][
8
])
=
{
vp9_sub_pel_filters_8lp
[
SUBPEL_SHIFTS
][
SUBPEL_TAPS
])
=
{
/* freqmultiplier = 0.5 */
{
0
,
0
,
0
,
128
,
0
,
0
,
0
,
0
},
{
0
,
0
,
0
,
128
,
0
,
0
,
0
,
0
},
{
-
3
,
-
1
,
32
,
64
,
38
,
1
,
-
3
,
0
},
{
-
3
,
-
1
,
32
,
64
,
38
,
1
,
-
3
,
0
},
{
-
2
,
-
2
,
29
,
63
,
41
,
2
,
-
3
,
0
},
{
-
2
,
-
2
,
29
,
63
,
41
,
2
,
-
3
,
0
},
...
...
This diff is collapsed.
Click to expand it.
vp9/common/vp9_filter.h
+
8
−
9
View file @
381d3b8b
...
@@ -17,18 +17,17 @@
...
@@ -17,18 +17,17 @@
#define SUBPEL_BITS 4
#define SUBPEL_BITS 4
#define SUBPEL_MASK ((1 << SUBPEL_BITS) - 1)
#define SUBPEL_MASK ((1 << SUBPEL_BITS) - 1)
#define SUBPEL_SHIFTS (1 << SUBPEL_BITS)
#define SUBPEL_SHIFTS (1 << SUBPEL_BITS)
#define SUBPEL_TAPS 8
extern
const
int16_t
vp9_bilinear_filters
[
SUBPEL_SHIFTS
][
8
];
extern
const
int16_t
vp9_bilinear_filters
[
SUBPEL_SHIFTS
][
SUBPEL_TAPS
];
extern
const
int16_t
vp9_sub_pel_filters_6
[
SUBPEL_SHIFTS
][
8
];
extern
const
int16_t
vp9_sub_pel_filters_6
[
SUBPEL_SHIFTS
][
SUBPEL_TAPS
];
extern
const
int16_t
vp9_sub_pel_filters_8
[
SUBPEL_SHIFTS
][
8
];
extern
const
int16_t
vp9_sub_pel_filters_8
[
SUBPEL_SHIFTS
][
SUBPEL_TAPS
];
extern
const
int16_t
vp9_sub_pel_filters_8s
[
SUBPEL_SHIFTS
][
8
];
extern
const
int16_t
vp9_sub_pel_filters_8s
[
SUBPEL_SHIFTS
][
SUBPEL_TAPS
];
extern
const
int16_t
vp9_sub_pel_filters_8lp
[
SUBPEL_SHIFTS
][
8
];
extern
const
int16_t
vp9_sub_pel_filters_8lp
[
SUBPEL_SHIFTS
][
SUBPEL_TAPS
];
// The VP9_BILINEAR_FILTERS_2TAP macro returns a pointer to the bilinear
// The VP9_BILINEAR_FILTERS_2TAP macro returns a pointer to the bilinear
// filter kernel as a 2 tap filter.
// filter kernel as a 2 tap filter.
#define BF_LENGTH (sizeof(vp9_bilinear_filters[0]) / \
#define VP9_BILINEAR_FILTERS_2TAP(x) \
sizeof(vp9_bilinear_filters[0][0]))
(vp9_bilinear_filters[(x)] + SUBPEL_TAPS/2 - 1)
#define BF_OFFSET (BF_LENGTH / 2 - 1)
#define VP9_BILINEAR_FILTERS_2TAP(x) (vp9_bilinear_filters[x] + BF_OFFSET)
#endif // VP9_COMMON_VP9_FILTER_H_
#endif // VP9_COMMON_VP9_FILTER_H_
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment