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
6796e7f1
Commit
6796e7f1
authored
Jul 15, 2016
by
Urvang Joshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove some useless casts
Change-Id: I8af087d97cadb0c2a9e37a4e4723246cdd397995
parent
764d1266
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
av1/av1_dx_iface.c
av1/av1_dx_iface.c
+2
-3
test/variance_test.cc
test/variance_test.cc
+3
-6
No files found.
av1/av1_dx_iface.c
View file @
6796e7f1
...
...
@@ -784,7 +784,7 @@ static aom_codec_err_t ctrl_set_reference(aom_codec_alg_priv_t *ctx,
static
aom_codec_err_t
ctrl_copy_reference
(
aom_codec_alg_priv_t
*
ctx
,
va_list
args
)
{
aom_ref_frame_t
*
data
=
va_arg
(
args
,
aom_ref_frame_t
*
);
const
aom_ref_frame_t
*
const
frame
=
va_arg
(
args
,
aom_ref_frame_t
*
);
// Only support this function in serial decode.
if
(
ctx
->
frame_parallel_decode
)
{
...
...
@@ -792,8 +792,7 @@ static aom_codec_err_t ctrl_copy_reference(aom_codec_alg_priv_t *ctx,
return
AOM_CODEC_INCAPABLE
;
}
if
(
data
)
{
aom_ref_frame_t
*
frame
=
(
aom_ref_frame_t
*
)
data
;
if
(
frame
)
{
YV12_BUFFER_CONFIG
sd
;
AVxWorker
*
const
worker
=
ctx
->
frame_workers
;
FrameWorkerData
*
const
frame_worker_data
=
(
FrameWorkerData
*
)
worker
->
data1
;
...
...
test/variance_test.cc
View file @
6796e7f1
...
...
@@ -102,8 +102,7 @@ static uint32_t variance_ref(const uint8_t *src, const uint8_t *ref, int l2w,
}
RoundHighBitDepth
(
bit_depth
,
&
se
,
&
sse
);
*
sse_ptr
=
static_cast
<
uint32_t
>
(
sse
);
return
static_cast
<
uint32_t
>
(
sse
-
((
static_cast
<
int64_t
>
(
se
)
*
se
)
>>
(
l2w
+
l2h
)));
return
static_cast
<
uint32_t
>
(
sse
-
((
se
*
se
)
>>
(
l2w
+
l2h
)));
}
/* The subpel reference functions differ from the codec version in one aspect:
...
...
@@ -158,8 +157,7 @@ static uint32_t subpel_variance_ref(const uint8_t *ref, const uint8_t *src,
}
RoundHighBitDepth
(
bit_depth
,
&
se
,
&
sse
);
*
sse_ptr
=
static_cast
<
uint32_t
>
(
sse
);
return
static_cast
<
uint32_t
>
(
sse
-
((
static_cast
<
int64_t
>
(
se
)
*
se
)
>>
(
l2w
+
l2h
)));
return
static_cast
<
uint32_t
>
(
sse
-
((
se
*
se
)
>>
(
l2w
+
l2h
)));
}
class
SumOfSquaresTest
:
public
::
testing
::
TestWithParam
<
SumOfSquaresFunction
>
{
...
...
@@ -523,8 +521,7 @@ static uint32_t subpel_avg_variance_ref(const uint8_t *ref, const uint8_t *src,
}
RoundHighBitDepth
(
bit_depth
,
&
se
,
&
sse
);
*
sse_ptr
=
static_cast
<
uint32_t
>
(
sse
);
return
static_cast
<
uint32_t
>
(
sse
-
((
static_cast
<
int64_t
>
(
se
)
*
se
)
>>
(
l2w
+
l2h
)));
return
static_cast
<
uint32_t
>
(
sse
-
((
se
*
se
)
>>
(
l2w
+
l2h
)));
}
template
<
typename
SubpelVarianceFunctionType
>
...
...
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