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
9fb593d0
Commit
9fb593d0
authored
Feb 17, 2016
by
Yaowu Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for Highbitdepth PSNR metric computations
Change-Id: I07324155f73bbdbe25bb7a7ccd587ebf9010ac7a
parent
7538501a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
4 deletions
+25
-4
test/hbd_metrics_test.cc
test/hbd_metrics_test.cc
+22
-0
vpx_dsp/psnr.c
vpx_dsp/psnr.c
+1
-2
vpx_dsp/psnr.h
vpx_dsp/psnr.h
+2
-2
No files found.
test/hbd_metrics_test.cc
View file @
9fb593d0
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
#include "test/acm_random.h"
#include "test/acm_random.h"
#include "test/util.h"
#include "test/util.h"
#include "./vpx_config.h"
#include "./vpx_config.h"
#include "vpx_dsp/psnr.h"
#include "vpx_dsp/ssim.h"
#include "vpx_dsp/ssim.h"
#include "vpx_ports/mem.h"
#include "vpx_ports/mem.h"
#include "vpx_ports/msvc.h"
#include "vpx_ports/msvc.h"
...
@@ -32,6 +33,19 @@ typedef double (*HBDMetricFunc)(const YV12_BUFFER_CONFIG *source,
...
@@ -32,6 +33,19 @@ typedef double (*HBDMetricFunc)(const YV12_BUFFER_CONFIG *source,
const
YV12_BUFFER_CONFIG
*
dest
,
const
YV12_BUFFER_CONFIG
*
dest
,
uint32_t
bd
);
uint32_t
bd
);
double
compute_hbd_psnr
(
const
YV12_BUFFER_CONFIG
*
source
,
const
YV12_BUFFER_CONFIG
*
dest
,
uint32_t
bit_depth
)
{
PSNR_STATS
psnr
;
calc_highbd_psnr
(
source
,
dest
,
&
psnr
,
bit_depth
,
bit_depth
);
return
psnr
.
psnr
[
0
];
}
double
compute_psnr
(
const
YV12_BUFFER_CONFIG
*
source
,
const
YV12_BUFFER_CONFIG
*
dest
)
{
PSNR_STATS
psnr
;
calc_psnr
(
source
,
dest
,
&
psnr
);
return
psnr
.
psnr
[
0
];
}
double
compute_hbd_psnrhvs
(
const
YV12_BUFFER_CONFIG
*
source
,
double
compute_hbd_psnrhvs
(
const
YV12_BUFFER_CONFIG
*
source
,
const
YV12_BUFFER_CONFIG
*
dest
,
const
YV12_BUFFER_CONFIG
*
dest
,
...
@@ -208,5 +222,13 @@ INSTANTIATE_TEST_CASE_P(
...
@@ -208,5 +222,13 @@ INSTANTIATE_TEST_CASE_P(
MetricTestTParam
(
&
compute_psnrhvs
,
&
compute_hbd_psnrhvs
,
12
,
MetricTestTParam
(
&
compute_psnrhvs
,
&
compute_hbd_psnrhvs
,
12
,
kPhvs_thresh
)));
kPhvs_thresh
)));
INSTANTIATE_TEST_CASE_P
(
PSNR
,
HBDMetricsTest
,
::
testing
::
Values
(
MetricTestTParam
(
&
compute_psnr
,
&
compute_hbd_psnr
,
10
,
kPhvs_thresh
),
MetricTestTParam
(
&
compute_psnr
,
&
compute_hbd_psnr
,
12
,
kPhvs_thresh
)));
}
// namespace
}
// namespace
vpx_dsp/psnr.c
View file @
9fb593d0
...
@@ -258,7 +258,7 @@ void calc_highbd_psnr(const YV12_BUFFER_CONFIG *a,
...
@@ -258,7 +258,7 @@ void calc_highbd_psnr(const YV12_BUFFER_CONFIG *a,
(
double
)
total_sse
);
(
double
)
total_sse
);
}
}
#e
lse
// !CONFIG_VP9_HIGHBITDEPTH
#e
ndif
// !CONFIG_VP9_HIGHBITDEPTH
void
calc_psnr
(
const
YV12_BUFFER_CONFIG
*
a
,
const
YV12_BUFFER_CONFIG
*
b
,
void
calc_psnr
(
const
YV12_BUFFER_CONFIG
*
a
,
const
YV12_BUFFER_CONFIG
*
b
,
PSNR_STATS
*
psnr
)
{
PSNR_STATS
*
psnr
)
{
...
@@ -295,4 +295,3 @@ void calc_psnr(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b,
...
@@ -295,4 +295,3 @@ void calc_psnr(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b,
psnr
->
psnr
[
0
]
=
vpx_sse_to_psnr
((
double
)
total_samples
,
peak
,
psnr
->
psnr
[
0
]
=
vpx_sse_to_psnr
((
double
)
total_samples
,
peak
,
(
double
)
total_sse
);
(
double
)
total_sse
);
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
vpx_dsp/psnr.h
View file @
9fb593d0
...
@@ -51,11 +51,11 @@ int64_t highbd_get_sse_shift(const uint8_t *a8, int a_stride,
...
@@ -51,11 +51,11 @@ int64_t highbd_get_sse_shift(const uint8_t *a8, int a_stride,
const
uint8_t
*
b8
,
int
b_stride
,
const
uint8_t
*
b8
,
int
b_stride
,
int
width
,
int
height
,
int
width
,
int
height
,
unsigned
int
input_shift
);
unsigned
int
input_shift
);
#e
lse
#e
ndif
void
calc_psnr
(
const
YV12_BUFFER_CONFIG
*
a
,
void
calc_psnr
(
const
YV12_BUFFER_CONFIG
*
a
,
const
YV12_BUFFER_CONFIG
*
b
,
const
YV12_BUFFER_CONFIG
*
b
,
PSNR_STATS
*
psnr
);
PSNR_STATS
*
psnr
);
#endif
int64_t
highbd_get_sse
(
const
uint8_t
*
a
,
int
a_stride
,
int64_t
highbd_get_sse
(
const
uint8_t
*
a
,
int
a_stride
,
const
uint8_t
*
b
,
int
b_stride
,
const
uint8_t
*
b
,
int
b_stride
,
int
width
,
int
height
);
int
width
,
int
height
);
...
...
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