Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aom-rav1e
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
aom-rav1e
Commits
7e4c3069
Commit
7e4c3069
authored
May 06, 2016
by
Johann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use canonical avg_pred functions
Change-Id: Ibe0cc388226622561d2b4a00e5bdc1016a3c4a94
parent
d3a62ac8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
43 deletions
+2
-43
vpx_dsp/sad.c
vpx_dsp/sad.c
+2
-43
No files found.
vpx_dsp/sad.c
View file @
7e4c3069
...
...
@@ -33,47 +33,6 @@ static INLINE unsigned int sad(const uint8_t *a, int a_stride,
return
sad
;
}
// TODO(johannkoenig): this moved to vpx_dsp, should be able to clean this up.
/* Remove dependency on vp9 variance function by duplicating vp9_comp_avg_pred.
* The function averages every corresponding element of the buffers and stores
* the value in a third buffer, comp_pred.
* pred and comp_pred are assumed to have stride = width
* In the usage below comp_pred is a local array.
*/
static
INLINE
void
avg_pred
(
uint8_t
*
comp_pred
,
const
uint8_t
*
pred
,
int
width
,
int
height
,
const
uint8_t
*
ref
,
int
ref_stride
)
{
int
i
,
j
;
for
(
i
=
0
;
i
<
height
;
i
++
)
{
for
(
j
=
0
;
j
<
width
;
j
++
)
{
const
int
tmp
=
pred
[
j
]
+
ref
[
j
];
comp_pred
[
j
]
=
ROUND_POWER_OF_TWO
(
tmp
,
1
);
}
comp_pred
+=
width
;
pred
+=
width
;
ref
+=
ref_stride
;
}
}
#if CONFIG_VP9_HIGHBITDEPTH
static
INLINE
void
highbd_avg_pred
(
uint16_t
*
comp_pred
,
const
uint8_t
*
pred8
,
int
width
,
int
height
,
const
uint8_t
*
ref8
,
int
ref_stride
)
{
int
i
,
j
;
uint16_t
*
pred
=
CONVERT_TO_SHORTPTR
(
pred8
);
uint16_t
*
ref
=
CONVERT_TO_SHORTPTR
(
ref8
);
for
(
i
=
0
;
i
<
height
;
i
++
)
{
for
(
j
=
0
;
j
<
width
;
j
++
)
{
const
int
tmp
=
pred
[
j
]
+
ref
[
j
];
comp_pred
[
j
]
=
ROUND_POWER_OF_TWO
(
tmp
,
1
);
}
comp_pred
+=
width
;
pred
+=
width
;
ref
+=
ref_stride
;
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#define sadMxN(m, n) \
unsigned int vpx_sad##m##x##n##_c(const uint8_t *src, int src_stride, \
const uint8_t *ref, int ref_stride) { \
...
...
@@ -83,7 +42,7 @@ unsigned int vpx_sad##m##x##n##_avg_c(const uint8_t *src, int src_stride, \
const uint8_t *ref, int ref_stride, \
const uint8_t *second_pred) { \
uint8_t comp_pred[m * n]; \
avg_pred
(comp_pred, second_pred, m, n, ref, ref_stride); \
vpx_comp_avg_pred_c
(comp_pred, second_pred, m, n, ref, ref_stride); \
return sad(src, src_stride, comp_pred, m, m, n); \
}
...
...
@@ -221,7 +180,7 @@ unsigned int vpx_highbd_sad##m##x##n##_avg_c(const uint8_t *src, \
int ref_stride, \
const uint8_t *second_pred) { \
uint16_t comp_pred[m * n]; \
highbd_avg_pred
(comp_pred, second_pred, m, n, ref, ref_stride); \
vpx_highbd_comp_avg_pred_c
(comp_pred, second_pred, m, n, ref, ref_stride); \
return highbd_sadb(src, src_stride, comp_pred, m, m, n); \
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment