Skip to content

Jpeg remove source ctx#1519

Merged
NicolasHug merged 3 commits into
meta-pytorch:mainfrom
NicolasHug:jpeg-remove-source-ctx
Jul 18, 2026
Merged

Jpeg remove source ctx#1519
NicolasHug merged 3 commits into
meta-pytorch:mainfrom
NicolasHug:jpeg-remove-source-ctx

Conversation

@NicolasHug

@NicolasHug NicolasHug commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

The source_ctx_t is not needed, our source is always a tensor of uint8 so it fits with the builtin pointer-based libjpeg mechanism by just setting

  jpeg_ctx.src->bytes_in_buffer = len;
  jpeg_ctx.src->next_input_byte = data;

We were in fact never relying on the extra data and len fields of the source_ctx_t struct.

@pytorch-bot

pytorch-bot Bot commented Jul 18, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

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 Jul 18, 2026
@NicolasHug
NicolasHug merged commit 4b81c61 into meta-pytorch:main Jul 18, 2026
26 checks passed
@NicolasHug
NicolasHug deleted the jpeg-remove-source-ctx branch July 18, 2026 18:34
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.

1 participant