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
26a1ad60
Commit
26a1ad60
authored
11 years ago
by
Dmitry Kovalev
Committed by
Gerrit Code Review
11 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Removing function pointers from inter prediction."
parents
d1899557
50f97cf7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vp9/common/vp9_reconinter.c
+22
-40
22 additions, 40 deletions
vp9/common/vp9_reconinter.c
with
22 additions
and
40 deletions
vp9/common/vp9_reconinter.c
+
22
−
40
View file @
26a1ad60
...
...
@@ -117,16 +117,13 @@ MV clamp_mv_to_umv_border_sb(const MACROBLOCKD *xd, const MV *src_mv,
return
clamped_mv
;
}
struct
build_inter_predictors_args
{
MACROBLOCKD
*
xd
;
int
x
,
y
;
};
static
void
build_inter_predictors
(
int
plane
,
int
block
,
BLOCK_SIZE
bsize
,
int
pred_w
,
int
pred_h
,
void
*
argv
)
{
const
struct
build_inter_predictors_args
*
const
arg
=
argv
;
MACROBLOCKD
*
const
xd
=
arg
->
xd
;
// TODO(jkoleszar): In principle, pred_w, pred_h are unnecessary, as we could
// calculate the subsampled BLOCK_SIZE, but that type isn't defined for
// sizes smaller than 16x16 yet.
static
void
build_inter_predictors
(
MACROBLOCKD
*
xd
,
int
plane
,
int
block
,
BLOCK_SIZE
bsize
,
int
pred_w
,
int
pred_h
,
int
mi_x
,
int
mi_y
)
{
struct
macroblockd_plane
*
const
pd
=
&
xd
->
plane
[
plane
];
const
int
bwl
=
b_width_log2
(
bsize
)
-
pd
->
subsampling_x
;
const
int
bw
=
4
<<
bwl
;
...
...
@@ -172,7 +169,7 @@ static void build_inter_predictors(int plane, int block, BLOCK_SIZE bsize,
if
(
vp9_is_scaled
(
scale
->
sfc
))
{
pre
=
pre_buf
->
buf
+
scaled_buffer_offset
(
x
,
y
,
pre_buf
->
stride
,
scale
);
scale
->
sfc
->
set_scaled_offsets
(
scale
,
arg
->
y
+
y
,
arg
->
x
+
x
);
scale
->
sfc
->
set_scaled_offsets
(
scale
,
mi_
y
+
y
,
mi_
x
+
x
);
scaled_mv
=
scale
->
sfc
->
scale_mv
(
&
mv_q4
,
scale
);
xs
=
scale
->
sfc
->
x_step_q4
;
ys
=
scale
->
sfc
->
y_step_q4
;
...
...
@@ -190,40 +187,25 @@ static void build_inter_predictors(int plane, int block, BLOCK_SIZE bsize,
}
}
// TODO(jkoleszar): In principle, pred_w, pred_h are unnecessary, as we could
// calculate the subsampled BLOCK_SIZE, but that type isn't defined for
// sizes smaller than 16x16 yet.
typedef
void
(
*
foreach_predicted_block_visitor
)(
int
plane
,
int
block
,
BLOCK_SIZE
bsize
,
int
pred_w
,
int
pred_h
,
void
*
arg
);
static
INLINE
void
foreach_predicted_block_in_plane
(
const
MACROBLOCKD
*
const
xd
,
BLOCK_SIZE
bsize
,
int
plane
,
foreach_predicted_block_visitor
visit
,
void
*
arg
)
{
const
int
bwl
=
b_width_log2
(
bsize
)
-
xd
->
plane
[
plane
].
subsampling_x
;
const
int
bhl
=
b_height_log2
(
bsize
)
-
xd
->
plane
[
plane
].
subsampling_y
;
if
(
xd
->
mi_8x8
[
0
]
->
mbmi
.
sb_type
<
BLOCK_8X8
)
{
int
i
=
0
,
x
,
y
;
assert
(
bsize
==
BLOCK_8X8
);
for
(
y
=
0
;
y
<
1
<<
bhl
;
++
y
)
for
(
x
=
0
;
x
<
1
<<
bwl
;
++
x
)
visit
(
plane
,
i
++
,
bsize
,
0
,
0
,
arg
);
}
else
{
visit
(
plane
,
0
,
bsize
,
bwl
,
bhl
,
arg
);
}
}
static
void
build_inter_predictors_for_planes
(
MACROBLOCKD
*
xd
,
BLOCK_SIZE
bsize
,
int
mi_row
,
int
mi_col
,
int
plane_from
,
int
plane_to
)
{
int
plane
;
for
(
plane
=
plane_from
;
plane
<=
plane_to
;
++
plane
)
{
struct
build_inter_predictors_args
args
=
{
xd
,
mi_col
*
MI_SIZE
,
mi_row
*
MI_SIZE
,
};
foreach_predicted_block_in_plane
(
xd
,
bsize
,
plane
,
build_inter_predictors
,
&
args
);
const
int
mi_x
=
mi_col
*
MI_SIZE
;
const
int
mi_y
=
mi_row
*
MI_SIZE
;
const
int
bwl
=
b_width_log2
(
bsize
)
-
xd
->
plane
[
plane
].
subsampling_x
;
const
int
bhl
=
b_height_log2
(
bsize
)
-
xd
->
plane
[
plane
].
subsampling_y
;
if
(
xd
->
mi_8x8
[
0
]
->
mbmi
.
sb_type
<
BLOCK_8X8
)
{
int
i
=
0
,
x
,
y
;
assert
(
bsize
==
BLOCK_8X8
);
for
(
y
=
0
;
y
<
1
<<
bhl
;
++
y
)
for
(
x
=
0
;
x
<
1
<<
bwl
;
++
x
)
build_inter_predictors
(
xd
,
plane
,
i
++
,
bsize
,
0
,
0
,
mi_x
,
mi_y
);
}
else
{
build_inter_predictors
(
xd
,
plane
,
0
,
bsize
,
bwl
,
bhl
,
mi_x
,
mi_y
);
}
}
}
...
...
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