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

Add helper functions for codec string and bit depth #10

Merged
merged 6 commits into from
Oct 8, 2024
Merged

Conversation

emilk
Copy link
Member

@emilk emilk commented Oct 8, 2024

No description provided.

@emilk emilk added include in changelog Will appear in CHANGELOG.md enhancement New feature or request labels Oct 8, 2024
@@ -19,7 +19,7 @@ pub struct Av01Box {
#[serde(with = "value_u32")]
pub vertresolution: FixedPointU16,
pub frame_count: u16,
pub depth: u16,
pub depth: u16, // I don't know what this is, but it is usually 24
Copy link
Member

Choose a reason for hiding this comment

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

Pretty sure this is just bit depth, 3 channels * 8 bits per pixel = 24 bits total

Copy link
Member

Choose a reason for hiding this comment

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

That's what I was about to write as well, especially since our av1 decoder also likes to talk in "total bits per full color sample" (i.e. 24/30/34). But then Emil told me on a call that he observed 24bit on a 10bit hdr video if I understood correctly.
Maybe worth pointing out here!

Copy link
Member Author

Choose a reason for hiding this comment

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

I get depth: 24, bit_depth: 10 when I print both

Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

lgtm! Pointed some opportunities out for better docs

pub depth: u16, // I don't know what this is, but it is usually 24

this is really killing me, but couldn't quickly find out with properly backed up sources either 😄

src/mp4box/stsd.rs Outdated Show resolved Hide resolved
src/mp4box/stsd.rs Show resolved Hide resolved
src/mp4box/stsd.rs Show resolved Hide resolved
@emilk emilk merged commit 8614aae into main Oct 8, 2024
6 checks passed
@emilk emilk deleted the emilk/better-info branch October 8, 2024 13:20
emilk added a commit to rerun-io/rerun that referenced this pull request Oct 8, 2024
### What
* Uses rerun-io/re_mp4#10

Improves the video blob info in two ways:
* Adds bit depth (if known)
* Shows human-redable name of codec (e.g. AV1 or H.264)

![Screenshot 2024-10-08 at 15 25
24](https://github.com/user-attachments/assets/8a104b85-32fa-4176-8fa3-bd20bca01df6)

![Screenshot 2024-10-08 at 15 25
35](https://github.com/user-attachments/assets/db377cb7-d960-4edc-ad6b-ad60a3363e12)

![Screenshot 2024-10-08 at 15 27
41](https://github.com/user-attachments/assets/cebcb06b-7e16-4101-b9c1-dee549b6038e)


A warning will also be printed if trying to decode a HDR video (since we
don't yet support that).

Related:
* #7594

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using examples from latest `main` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/7633?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/7633?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!
* [x] If have noted any breaking changes to the log API in
`CHANGELOG.md` and the migration guide

- [PR Build Summary](https://build.rerun.io/pr/7633)
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

To run all checks from `main`, comment on the PR with `@rerun-bot
full-check`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request include in changelog Will appear in CHANGELOG.md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants