-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
struct refmvs_frame
: Make fields safer without changing layout
#822
Comments
There may be a conflict with #821 where a pointer to a |
Ah, that's a good point. Even before #821 |
I think we should do part of this. At least, |
refmvs_frame
: Make fields safestruct refmvs_frame
: Make fields safer without changing layout
* Fixes `frm_hdr` field of #822. This removes the `*const Rav1dFrameHeader` in the field, passing it through the call stack. But we can't change the field's layout since `*const refmvs_frame` is passed to asm, so we make the field `*const ()` and `ptr::null()`. This also fixes the problem of accidentally conflating `*const Rav1dFrameHeader` and `*const Dav1dFrameHeader` in that field.
Also cleanup
rav1d_refmvs_init
andrav1d_refmvs_clear
.frm_hdr
- Pointer tof.frame_hdr
. We may be able to passframe_hdr
into the places where it's used.frm_hdr
is only used fromrav1d_refmvs_find
andadd_temporal_candidate
, which is only called fromrav1d_refmvs_find
. So if we can passf.frame_hdr
intorav1d_refmvs_find
and then down intoadd_temporal_candidate
we should be able to remove this field. Sincefrm_hdr
is not used byload_tmvs_c
(and thus not accessed by asm), we should change it to a*const ()
, signifying that it should never be used while keeping the layout the same. It is dangerous to keep it as a*const Rav1dFrameHeader
, since it's a*const Dav1dFrameHeader
in C. And passing the&Rav1dFrameHeader
through the callstack removes the lifetime issue as well.rp
- Points tof.mvs
.rp
is also not accessed inload_tmvs_c
, so hopefully we can change it (in a layout preserving manner).The text was updated successfully, but these errors were encountered: