Open rom1v opened 5 years ago
FYI, the output of adjust_bo( ) function, i.e. bo_adj, should be always even numbers, because the width and height is always multiple of 8, so the BlockOffset is always even numbers.
Oh yes. Thank you :+1: That explains why there is absolutely no difference in practice.
Hmmm, in fact, I'm not convinced yet. adjust_bo()
may return the very same block passed as argument (if it's already within bounds).
Another tip with adjust_bo( ) is that, it only alters the input bo when it is close to right and bottom frame border. Precisely, when 8x8 block starting with bo is straddle on the right or bottom frame border.
Yes, so if input bo has an odd component, the output bo may also have an odd component, am I correct?
Hmm, you are right and when the blk_size is 4, either side, offset is odd number.
Also, fn adjust_bo
In
estimate_motion_ss2()
, the half-res block offset is half of the full-res block offset:https://github.com/xiph/rav1e/blob/265889fae2d3250b53e824ee868863f7455823a3/src/me.rs#L400
and the half-res plane offset is half of the full-res plane offset:
https://github.com/xiph/rav1e/blob/265889fae2d3250b53e824ee868863f7455823a3/src/me.rs#L401-L404
But if one of the block offset components is odd, then the computed half-res plane offset is not the same as the plane offset of the half-ref block offset.
For example:
Then:
And:
However, the plane offset associated to
bo_adj_h
is:Which plane offset is correct? The current version, or the one associated with
bo_adj_h
?