Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
100846a8
Commit
100846a8
authored
Aug 29, 2016
by
Debargha Mukherjee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clpf experiment build fix
Change-Id: I729e14916ecb58b5a75756078ab96a2d340bc0d6
parent
8ee5ab9f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
25 deletions
+54
-25
vp10/encoder/encoder.c
vp10/encoder/encoder.c
+8
-25
vpx_dsp/psnr.c
vpx_dsp/psnr.c
+40
-0
vpx_dsp/psnr.h
vpx_dsp/psnr.h
+6
-0
No files found.
vp10/encoder/encoder.c
View file @
100846a8
...
...
@@ -3446,35 +3446,18 @@ static void loopfilter_frame(VP10_COMP *cpi, VP10_COMMON *cm) {
// encoded
#if CLPF_FILTER_ALL_PLANES
vpx_yv12_copy_frame
(
cm
->
frame_to_show
,
&
cpi
->
last_frame_uf
);
before
=
get_sse
(
cpi
->
Source
->
y_buffer
,
cpi
->
Source
->
y_stride
,
cm
->
frame_to_show
->
y_buffer
,
cm
->
frame_to_show
->
y_stride
,
cpi
->
Source
->
y_crop_width
,
cpi
->
Source
->
y_crop_height
)
+
get_sse
(
cpi
->
Source
->
u_buffer
,
cpi
->
Source
->
uv_stride
,
cm
->
frame_to_show
->
u_buffer
,
cm
->
frame_to_show
->
uv_stride
,
cpi
->
Source
->
uv_crop_width
,
cpi
->
Source
->
uv_crop_height
)
+
get_sse
(
cpi
->
Source
->
v_buffer
,
cpi
->
Source
->
uv_stride
,
cm
->
frame_to_show
->
v_buffer
,
cm
->
frame_to_show
->
uv_stride
,
cpi
->
Source
->
uv_crop_width
,
cpi
->
Source
->
uv_crop_height
);
before
=
vpx_get_y_sse
(
cpi
->
Source
,
cm
->
frame_to_show
)
+
vpx_get_u_sse
(
cpi
->
Source
,
cm
->
frame_to_show
)
+
vpx_get_v_sse
(
cpi
->
Source
,
cm
->
frame_to_show
);
vp10_clpf_frame
(
cm
->
frame_to_show
,
cm
,
xd
);
after
=
get_sse
(
cpi
->
Source
->
y_buffer
,
cpi
->
Source
->
y_stride
,
cm
->
frame_to_show
->
y_buffer
,
cm
->
frame_to_show
->
y_stride
,
cpi
->
Source
->
y_crop_width
,
cpi
->
Source
->
y_crop_height
)
+
get_sse
(
cpi
->
Source
->
u_buffer
,
cpi
->
Source
->
uv_stride
,
cm
->
frame_to_show
->
u_buffer
,
cm
->
frame_to_show
->
uv_stride
,
cpi
->
Source
->
uv_crop_width
,
cpi
->
Source
->
uv_crop_height
)
+
get_sse
(
cpi
->
Source
->
v_buffer
,
cpi
->
Source
->
uv_stride
,
cm
->
frame_to_show
->
v_buffer
,
cm
->
frame_to_show
->
uv_stride
,
cpi
->
Source
->
uv_crop_width
,
cpi
->
Source
->
uv_crop_height
);
after
=
vpx_get_y_sse
(
cpi
->
Source
,
cm
->
frame_to_show
)
+
vpx_get_u_sse
(
cpi
->
Source
,
cm
->
frame_to_show
)
+
vpx_get_v_sse
(
cpi
->
Source
,
cm
->
frame_to_show
);
#else
vpx_yv12_copy_y
(
cm
->
frame_to_show
,
&
cpi
->
last_frame_uf
);
before
=
get_sse
(
cpi
->
Source
->
y_buffer
,
cpi
->
Source
->
y_stride
,
cm
->
frame_to_show
->
y_buffer
,
cm
->
frame_to_show
->
y_stride
,
cpi
->
Source
->
y_crop_width
,
cpi
->
Source
->
y_crop_height
);
before
=
vpx_get_y_sse
(
cpi
->
Source
,
cm
->
frame_to_show
);
vp10_clpf_frame
(
cm
->
frame_to_show
,
cm
,
xd
);
after
=
get_sse
(
cpi
->
Source
->
y_buffer
,
cpi
->
Source
->
y_stride
,
cm
->
frame_to_show
->
y_buffer
,
cm
->
frame_to_show
->
y_stride
,
cpi
->
Source
->
y_crop_width
,
cpi
->
Source
->
y_crop_height
);
after
=
vpx_get_y_sse
(
cpi
->
Source
,
cm
->
frame_to_show
);
#endif
if
(
before
<
after
)
{
// No improvement, restore original
...
...
vpx_dsp/psnr.c
View file @
100846a8
...
...
@@ -184,6 +184,24 @@ int64_t vpx_get_y_sse(const YV12_BUFFER_CONFIG *a,
a
->
y_crop_width
,
a
->
y_crop_height
);
}
int64_t
vpx_get_u_sse
(
const
YV12_BUFFER_CONFIG
*
a
,
const
YV12_BUFFER_CONFIG
*
b
)
{
assert
(
a
->
uv_crop_width
==
b
->
uv_crop_width
);
assert
(
a
->
uv_crop_height
==
b
->
uv_crop_height
);
return
get_sse
(
a
->
u_buffer
,
a
->
uv_stride
,
b
->
u_buffer
,
b
->
uv_stride
,
a
->
uv_crop_width
,
a
->
uv_crop_height
);
}
int64_t
vpx_get_v_sse
(
const
YV12_BUFFER_CONFIG
*
a
,
const
YV12_BUFFER_CONFIG
*
b
)
{
assert
(
a
->
uv_crop_width
==
b
->
uv_crop_width
);
assert
(
a
->
uv_crop_height
==
b
->
uv_crop_height
);
return
get_sse
(
a
->
v_buffer
,
a
->
uv_stride
,
b
->
v_buffer
,
b
->
uv_stride
,
a
->
uv_crop_width
,
a
->
uv_crop_height
);
}
#if CONFIG_VP9_HIGHBITDEPTH
int64_t
vpx_highbd_get_y_sse
(
const
YV12_BUFFER_CONFIG
*
a
,
const
YV12_BUFFER_CONFIG
*
b
)
{
...
...
@@ -195,6 +213,28 @@ int64_t vpx_highbd_get_y_sse(const YV12_BUFFER_CONFIG *a,
return
highbd_get_sse
(
a
->
y_buffer
,
a
->
y_stride
,
b
->
y_buffer
,
b
->
y_stride
,
a
->
y_crop_width
,
a
->
y_crop_height
);
}
int64_t
vpx_highbd_get_u_sse
(
const
YV12_BUFFER_CONFIG
*
a
,
const
YV12_BUFFER_CONFIG
*
b
)
{
assert
(
a
->
uv_crop_width
==
b
->
uv_crop_width
);
assert
(
a
->
uv_crop_height
==
b
->
uv_crop_height
);
assert
((
a
->
flags
&
YV12_FLAG_HIGHBITDEPTH
)
!=
0
);
assert
((
b
->
flags
&
YV12_FLAG_HIGHBITDEPTH
)
!=
0
);
return
highbd_get_sse
(
a
->
u_buffer
,
a
->
uv_stride
,
b
->
u_buffer
,
b
->
uv_stride
,
a
->
uv_crop_width
,
a
->
uv_crop_height
);
}
int64_t
vpx_highbd_get_v_sse
(
const
YV12_BUFFER_CONFIG
*
a
,
const
YV12_BUFFER_CONFIG
*
b
)
{
assert
(
a
->
uv_crop_width
==
b
->
uv_crop_width
);
assert
(
a
->
uv_crop_height
==
b
->
uv_crop_height
);
assert
((
a
->
flags
&
YV12_FLAG_HIGHBITDEPTH
)
!=
0
);
assert
((
b
->
flags
&
YV12_FLAG_HIGHBITDEPTH
)
!=
0
);
return
highbd_get_sse
(
a
->
v_buffer
,
a
->
uv_stride
,
b
->
v_buffer
,
b
->
uv_stride
,
a
->
uv_crop_width
,
a
->
uv_crop_height
);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VP9_HIGHBITDEPTH
...
...
vpx_dsp/psnr.h
View file @
100846a8
...
...
@@ -37,9 +37,15 @@ typedef struct {
*/
double
vpx_sse_to_psnr
(
double
samples
,
double
peak
,
double
sse
);
int64_t
vpx_get_y_sse
(
const
YV12_BUFFER_CONFIG
*
a
,
const
YV12_BUFFER_CONFIG
*
b
);
int64_t
vpx_get_u_sse
(
const
YV12_BUFFER_CONFIG
*
a
,
const
YV12_BUFFER_CONFIG
*
b
);
int64_t
vpx_get_v_sse
(
const
YV12_BUFFER_CONFIG
*
a
,
const
YV12_BUFFER_CONFIG
*
b
);
#if CONFIG_VP9_HIGHBITDEPTH
int64_t
vpx_highbd_get_y_sse
(
const
YV12_BUFFER_CONFIG
*
a
,
const
YV12_BUFFER_CONFIG
*
b
);
int64_t
vpx_highbd_get_u_sse
(
const
YV12_BUFFER_CONFIG
*
a
,
const
YV12_BUFFER_CONFIG
*
b
);
int64_t
vpx_highbd_get_v_sse
(
const
YV12_BUFFER_CONFIG
*
a
,
const
YV12_BUFFER_CONFIG
*
b
);
void
vpx_calc_highbd_psnr
(
const
YV12_BUFFER_CONFIG
*
a
,
const
YV12_BUFFER_CONFIG
*
b
,
PSNR_STATS
*
psnr
,
unsigned
int
bit_depth
,
unsigned
int
in_bit_depth
);
...
...
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