Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
d03b3cbd
Commit
d03b3cbd
authored
Oct 31, 2013
by
Yunqing Wang
Committed by
Gerrit Code Review
Oct 31, 2013
Browse files
Merge "Fix x_offset_q4/y_offset_q4 calculation"
parents
b26ce8b1
9ed2d0a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
vp9/common/vp9_reconinter.c
View file @
d03b3cbd
...
...
@@ -161,13 +161,12 @@ static void build_inter_predictors(int plane, int block, BLOCK_SIZE bsize,
// scaling case. It needs to be done on the scaled MV, not the pre-scaling
// MV. Note however that it performs the subsampling aware scaling so
// that the result is always q4.
const
MV
res_mv
=
clamp_mv_to_umv_border_sb
(
xd
,
&
mv
,
bw
,
bh
,
pd
->
subsampling_x
,
pd
->
subsampling_y
);
// mv_precision precision is MV_PRECISION_Q4.
const
MV
mv_q4
=
clamp_mv_to_umv_border_sb
(
xd
,
&
mv
,
bw
,
bh
,
pd
->
subsampling_x
,
pd
->
subsampling_y
);
uint8_t
*
pre
;
// mv_precision precision is MV_PRECISION_Q4.
const
MV
mv_q4
=
{
res_mv
.
row
,
res_mv
.
col
};
MV32
scaled_mv
;
int
xs
,
ys
;
...
...
vp9/encoder/vp9_rdopt.c
View file @
d03b3cbd
...
...
@@ -2283,12 +2283,8 @@ static void setup_buffer_inter(VP9_COMP *cpi, MACROBLOCK *x,
// set up scaling factors
scale
[
frame_type
]
=
cpi
->
common
.
active_ref_scale
[
frame_type
-
1
];
scale
[
frame_type
].
x_offset_q4
=
ROUND_POWER_OF_TWO
(
mi_col
*
MI_SIZE
*
scale
[
frame_type
].
sfc
->
x_scale_fp
,
REF_SCALE_SHIFT
)
&
0xf
;
scale
[
frame_type
].
y_offset_q4
=
ROUND_POWER_OF_TWO
(
mi_row
*
MI_SIZE
*
scale
[
frame_type
].
sfc
->
y_scale_fp
,
REF_SCALE_SHIFT
)
&
0xf
;
scale
[
frame_type
].
sfc
->
set_scaled_offsets
(
&
scale
[
frame_type
],
mi_row
*
MI_SIZE
,
mi_col
*
MI_SIZE
);
// TODO(jkoleszar): Is the UV buffer ever used here? If so, need to make this
// use the UV scaling factors.
...
...
Write
Preview
Supports
Markdown
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