Skip to content

Rename the image decoders' OutputDtype to ImageOutputDtypeConfig - #1699

Open
NicolasHug wants to merge 1 commit into
nvdec-surface-depthfrom
image-output-dtype-config
Open

Rename the image decoders' OutputDtype to ImageOutputDtypeConfig#1699
NicolasHug wants to merge 1 commit into
nvdec-surface-depthfrom
image-output-dtype-config

Conversation

@NicolasHug

Copy link
Copy Markdown
Contributor

ImageCommon.h declared facebook::torchcodec::OutputDtype {UINT8, UINT16,
AUTO} and StreamOptions.h declares facebook::torchcodec::OutputDtype
{UINT8, FLOAT32}: two different types with one fully-qualified name. They
compile today only because no translation unit includes both headers - the
image decoders are FFmpeg-free and pull in neither StreamOptions.h nor
FFMPEGCommon.h nor Frame.h - which makes it a trap for whoever first makes
those worlds touch.

The image one is the odd name rather than the odd type: it carries AUTO and
is resolved at the point of use by should_output_uint16(), so it is a
config, and it is the counterpart of OutputDtypeConfig rather than of
OutputDtype. The int64 codes crossing the op boundary are unchanged, so
_validate_output_dtype on the Python side needs nothing.


Stack created with GitHub Stacks CLIGive Feedback 💬

@pytorch-bot

pytorch-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 1 New Failure

As of commit 89c1ff4 with merge base 2312413 (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 Sep 4, 2026
@NicolasHug
NicolasHug changed the base branch from output-dtype-config-only to nvdec-surface-depth September 4, 2026 09:27
@NicolasHug
NicolasHug force-pushed the image-output-dtype-config branch 2 times, most recently from a8c154c to e580830 Compare September 4, 2026 10:02
ImageCommon.h declared facebook::torchcodec::OutputDtype {UINT8, UINT16,
AUTO} and StreamOptions.h declares facebook::torchcodec::OutputDtype
{UINT8, FLOAT32}: two different types with one fully-qualified name. They
compile today only because no translation unit includes both headers - the
image decoders are FFmpeg-free and pull in neither StreamOptions.h nor
FFMPEGCommon.h nor Frame.h - which makes it a trap for whoever first makes
those worlds touch.

The image one is the odd name rather than the odd type: it carries AUTO and
is resolved at the point of use by should_output_uint16(), so it is a
config, and it is the counterpart of OutputDtypeConfig rather than of
OutputDtype. The int64 codes crossing the op boundary are unchanged, so
_validate_output_dtype on the Python side needs nothing.
@NicolasHug
NicolasHug force-pushed the image-output-dtype-config branch from e580830 to 89c1ff4 Compare September 4, 2026 10:18
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