Skip to content

Small video-related refactor#7660

Merged
emilk merged 7 commits intomainfrom
emilk/decoder-async-refactor
Oct 10, 2024
Merged

Small video-related refactor#7660
emilk merged 7 commits intomainfrom
emilk/decoder-async-refactor

Conversation

@emilk
Copy link
Copy Markdown
Member

@emilk emilk commented Oct 9, 2024

What

Some small improvements in service of coming ffmpeg stuff

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!
  • If have noted any breaking changes to the log API in CHANGELOG.md and the migration guide

To run all checks from main, comment on the PR with @rerun-bot full-check.

@emilk emilk added 🚜 refactor Change the code, not the functionality exclude from changelog PRs with this won't show up in CHANGELOG.md feat-video anything video decoding, player, querying, data modelling of videos etc. labels Oct 9, 2024
@emilk emilk changed the title Refactor frames example to use sync decoder Small video-related refactor Oct 9, 2024
}

pub enum PixelFormat {
Rgb8Unorm,
Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
Member Author

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.

@Wumpf Wumpf self-requested a review October 9, 2024 16:18
/// A single sample in a video.
#[derive(Debug, Clone)]
pub struct Sample {
/// The start of a new [`GroupOfPictures`]?
Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Member Author

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

}

pub enum PixelFormat {
Rgb8Unorm,
Copy link
Copy Markdown
Member

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),
Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
Member Author

@emilk emilk Oct 10, 2024

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.

@emilk emilk merged commit d66ce14 into main Oct 10, 2024
@emilk emilk deleted the emilk/decoder-async-refactor branch October 10, 2024 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exclude from changelog PRs with this won't show up in CHANGELOG.md feat-video anything video decoding, player, querying, data modelling of videos etc. 🚜 refactor Change the code, not the functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants