Skip to content
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

backport from dav1d 1.2.0: picture: allow storing an array of Dav1dITUTT35 entries #528

Conversation

fbossen
Copy link
Collaborator

@fbossen fbossen commented Oct 15, 2023

Partially addresses #224

@kkysen kkysen changed the title picture: allow storing an array of Dav1dITUTT35 entries (back port from dav1d 1.2.0) backport from dav1d 1.2.0: picture: allow storing an array of Dav1dITUTT35 entries Oct 18, 2023
meson.build Show resolved Hide resolved
@kkysen
Copy link
Collaborator

kkysen commented Oct 20, 2023

I think the code this changes has subtly changed a lot after my other PRs merged, so I think it should be re-reviewed after being rebased. Also, @fbossen, if you could stack the PRs so it doesn't include #518, that would be great (though #518 should be all ready to merge once it's rebased).

@fbossen
Copy link
Collaborator Author

fbossen commented Mar 4, 2024

I think the code this changes has subtly changed a lot after my other PRs merged, so I think it should be re-reviewed after being rebased.

There have been quite a few changes since this was initially written. Definitely needs another round of reviews. I am using DRav1d<Vec<Rav1dITUTT35>, Vec<Dav1dITUTT35>> to store the ITU-T T.35 data but am not convinced it's the best approach.

@fbossen
Copy link
Collaborator Author

fbossen commented Mar 17, 2024

@kkysen Can you have another look at this when you have time? I am sure there are better ways of doing this. Also, some more recent commits in dav1d build on top of this, so it may be good to have this integrated in a not too distant future.

@kkysen kkysen self-requested a review March 17, 2024 19:34
Copy link
Collaborator

@kkysen kkysen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fbossen, can I take over this and fix the conversion issues? I know the conversion code very well.

@fbossen
Copy link
Collaborator Author

fbossen commented Mar 19, 2024

@fbossen, can I take over this and fix the conversion issues? I know the conversion code very well.

Please go ahead

jamrial and others added 3 commits April 22, 2024 14:51
Nothing in the spec prevents a Temporal Unit from having more than one Metadata
OBU of type ITU-T T.35, so export them as an array instead of only exporting
the last one we parse.
This is backwards compatible with the previous implementation, as users unaware
of this change can ignore the n_itut_t35 field and still access the first (or
only) entry in the array as they have been doing until now.
@kkysen kkysen changed the base branch from main to kkysen/remove-Rav1dPicture-mem-zeroed April 22, 2024 21:52
Frank Bossen and others added 2 commits April 22, 2024 15:25
…g it an `Arc<TryLock<DRav1d<Vec<_>, Vec<_>>>>`.

Due to the now shared access to the `itut_t35` `Vec` to push new ones during parsing,
I added a zero-contention `TryLock` around it.

This also adds a lot of explicit initialization that was previously just zero initialized,
since the `Arc` is not all zeros.
…o `Box<[_]>`s since the mutation only happens on `Rav1dContext::itut_t35`.
@kkysen kkysen requested a review from randomPoison April 22, 2024 23:06
kkysen added a commit that referenced this pull request Apr 23, 2024
…with `Default::default()` as we already `impl Default` (#991)

Split off from #528.
@kkysen kkysen deleted the branch memorysafety:kkysen/remove-Rav1dPicture-mem-zeroed April 23, 2024 00:11
@kkysen kkysen closed this Apr 23, 2024
@kkysen
Copy link
Collaborator

kkysen commented Apr 23, 2024

Ugh, why did this get automatically closed?

kkysen added a commit that referenced this pull request Apr 23, 2024
…dITUTT35` entries (#993)

Reopening #528 since it got closed because I deleted the target branch,
which I guess happens when the PR branch is on a fork.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants