Skip to content

Refactor swscale into new class + rename filtergraph and swscale constructs#1215

Open
mollyxu wants to merge 13 commits intometa-pytorch:mainfrom
mollyxu:refactor-swscale
Open

Refactor swscale into new class + rename filtergraph and swscale constructs#1215
mollyxu wants to merge 13 commits intometa-pytorch:mainfrom
mollyxu:refactor-swscale

Conversation

@mollyxu
Copy link
Contributor

@mollyxu mollyxu commented Feb 2, 2026

Refactor sw_scale into new class similar to what we did for filtergraph. (#1135)

  • Encapsulate the double swscale path (color conversion + resize) in a new SwScale class with a clean convert() API
  • Merge SwScaleContext and SwsFrameContext into a single SwsConfig struct (colorspace is now part of the config rather than a separate parameter)
  • Add encodingSwsContext_ for the encoding path, separating it from the decoding swscale which is now managed by SwScale

Rename filtergraph and swscale constructs in CpuDeviceInterface (#925)

@pytorch-bot
Copy link

pytorch-bot bot commented Feb 2, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/meta-pytorch/torchcodec/1215

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit 640efe4 with merge base cc15044 (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Feb 2, 2026
@mollyxu mollyxu changed the title [wip] refactor swscale Refactor swscale into new class Feb 2, 2026
@mollyxu mollyxu marked this pull request as ready for review February 2, 2026 18:51
Copy link
Contributor

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

Thanks @mollyxu !

mollyxu and others added 4 commits February 13, 2026 14:28
Co-authored-by: Nicolas Hug <contact@nicolas-hug.com>
Co-authored-by: Nicolas Hug <contact@nicolas-hug.com>
@mollyxu mollyxu changed the title Refactor swscale into new class Refactor swscale into new class + rename filtergraph and swscale constructs Feb 13, 2026
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