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
4498194b
Commit
4498194b
authored
10 years ago
by
Dmitry Kovalev
Browse files
Options
Downloads
Patches
Plain Diff
Cleaning up vp9_variance.c
Change-Id: Ie2b9c9881085053c191f3f7b8253e283edef573b
parent
dea687f7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vp9/encoder/vp9_variance.c
+23
-46
23 additions, 46 deletions
vp9/encoder/vp9_variance.c
with
23 additions
and
46 deletions
vp9/encoder/vp9_variance.c
+
23
−
46
View file @
4498194b
...
...
@@ -113,12 +113,9 @@ unsigned int vp9_get_mb_ss_c(const int16_t *src_ptr) {
unsigned int vp9_variance##W##x##H##_c(const uint8_t *a, int a_stride, \
const uint8_t *b, int b_stride, \
unsigned int *sse) { \
unsigned int var; \
int avg; \
\
variance(a, a_stride, b, b_stride, W, H, &var, &avg); \
*sse = var; \
return var - (((int64_t)avg * avg) / (W * H)); \
int sum; \
variance(a, a_stride, b, b_stride, W, H, sse, &sum); \
return *sse - (((int64_t)sum * sum) / (W * H)); \
}
#define SUBPIX_VAR(W, H) \
...
...
@@ -172,56 +169,36 @@ void vp9_get_sse_sum_8x8_c(const uint8_t *src_ptr, int source_stride,
variance
(
src_ptr
,
source_stride
,
ref_ptr
,
ref_stride
,
8
,
8
,
sse
,
sum
);
}
unsigned
int
vp9_mse16x16_c
(
const
uint8_t
*
src_ptr
,
int
source_stride
,
const
uint8_t
*
ref_ptr
,
int
recon_stride
,
unsigned
int
vp9_mse16x16_c
(
const
uint8_t
*
src
,
int
src_stride
,
const
uint8_t
*
ref
,
int
ref_stride
,
unsigned
int
*
sse
)
{
unsigned
int
var
;
int
avg
;
variance
(
src_ptr
,
source_stride
,
ref_ptr
,
recon_stride
,
16
,
16
,
&
var
,
&
avg
);
*
sse
=
var
;
return
var
;
int
sum
;
variance
(
src
,
src_stride
,
ref
,
ref_stride
,
16
,
16
,
sse
,
&
sum
);
return
*
sse
;
}
unsigned
int
vp9_mse16x8_c
(
const
uint8_t
*
src_ptr
,
int
source_stride
,
const
uint8_t
*
ref_ptr
,
int
recon_stride
,
unsigned
int
vp9_mse16x8_c
(
const
uint8_t
*
src
,
int
src_stride
,
const
uint8_t
*
ref
,
int
ref_stride
,
unsigned
int
*
sse
)
{
unsigned
int
var
;
int
avg
;
variance
(
src_ptr
,
source_stride
,
ref_ptr
,
recon_stride
,
16
,
8
,
&
var
,
&
avg
);
*
sse
=
var
;
return
var
;
int
sum
;
variance
(
src
,
src_stride
,
ref
,
ref_stride
,
16
,
8
,
sse
,
&
sum
);
return
*
sse
;
}
unsigned
int
vp9_mse8x16_c
(
const
uint8_t
*
src_ptr
,
int
source_stride
,
const
uint8_t
*
ref_ptr
,
int
recon_stride
,
unsigned
int
vp9_mse8x16_c
(
const
uint8_t
*
src
,
int
src_stride
,
const
uint8_t
*
ref
,
int
ref_stride
,
unsigned
int
*
sse
)
{
unsigned
int
var
;
int
avg
;
variance
(
src_ptr
,
source_stride
,
ref_ptr
,
recon_stride
,
8
,
16
,
&
var
,
&
avg
);
*
sse
=
var
;
return
var
;
int
sum
;
variance
(
src
,
src_stride
,
ref
,
ref_stride
,
8
,
16
,
sse
,
&
sum
);
return
*
sse
;
}
unsigned
int
vp9_mse8x8_c
(
const
uint8_t
*
src_ptr
,
int
source_stride
,
const
uint8_t
*
ref_ptr
,
int
recon_stride
,
unsigned
int
vp9_mse8x8_c
(
const
uint8_t
*
src
,
int
src_stride
,
const
uint8_t
*
ref
,
int
ref_stride
,
unsigned
int
*
sse
)
{
unsigned
int
var
;
int
avg
;
variance
(
src_ptr
,
source_stride
,
ref_ptr
,
recon_stride
,
8
,
8
,
&
var
,
&
avg
);
*
sse
=
var
;
return
var
;
int
sum
;
variance
(
src
,
src_stride
,
ref
,
ref_stride
,
8
,
8
,
sse
,
&
sum
);
return
*
sse
;
}
VAR
(
4
,
4
)
...
...
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