Skip to content

Avoid copies of frame mappings #785

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

Merged
merged 1 commit into from
Jul 24, 2025

Conversation

Dan-Flores
Copy link
Contributor

@Dan-Flores Dan-Flores commented Jul 23, 2025

This PR makes minor changes to the C++ custom_frame_mappings arguments.

  • In makeFrameMappings, the Tensor arguments are moved into SingleStreamDecoder::FrameMappings using std::move to prevent copies.
  • In add_video_stream, the tuple containing the frame mappings are passed as a const reference to prevent unnecessary copies.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 23, 2025
@facebook-github-bot
Copy link
Contributor

@Dan-Flores has imported this pull request. If you are a Meta employee, you can view this in D78893518.

@Dan-Flores Dan-Flores changed the title [wip] Pass frame mappings by reference Avoid copies of frame mappings Jul 24, 2025
@Dan-Flores Dan-Flores marked this pull request as ready for review July 24, 2025 19:01
@Dan-Flores Dan-Flores merged commit de517c5 into pytorch:main Jul 24, 2025
44 of 46 checks passed
@Dan-Flores Dan-Flores deleted the fix_frame_mappings_lints branch July 24, 2025 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants