-
Notifications
You must be signed in to change notification settings - Fork 368
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
Small video-related refactor #7660
Conversation
@@ -55,5 +60,6 @@ pub struct Frame { | |||
} | |||
|
|||
pub enum PixelFormat { | |||
Rgb8Unorm, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the FFMPEG output
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it doesn't have to be though, we can choose that fairly freely, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not completely freely. We can pcik rgb24
, but not rgba32
, for instance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can pick some yuv formats for sure, but we didn't have GPU support for that when I wrote this code.
@@ -174,6 +175,9 @@ impl GroupOfPictures { | |||
/// A single sample in a video. | |||
#[derive(Debug, Clone)] | |||
pub struct Sample { | |||
/// The start of a new [`GroupOfPictures`]? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the question mark? That is how we defined them, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the question the boolean answers
@@ -55,5 +60,6 @@ pub struct Frame { | |||
} | |||
|
|||
pub enum PixelFormat { | |||
Rgb8Unorm, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it doesn't have to be though, we can choose that fairly freely, no?
return copy_video_frame_to_texture( | ||
queue, | ||
&Frame { | ||
data: crate::pad_rgb_to_rgba(&frame.data, 255_u8), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be a lot happier if this goes through texture manager's format conversions that landed on main now because that's what is going to happen with AV1 output now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course - that's part of #7608. But that's a much bigger PR than this one.
What
Some small improvements in service of coming ffmpeg stuff
Checklist
main
build: rerun.io/viewernightly
build: rerun.io/viewerCHANGELOG.md
and the migration guideTo run all checks from
main
, comment on the PR with@rerun-bot full-check
.