Add support for NotchLC via ffmpeg#200
Open
dev-joss wants to merge 7 commits into
Open
Conversation
NotchLC video is carried in native .mov files with FourCC 'nclc', which macOS demuxes but can't decode. Register the codec with the videodecoder extension and route it to FFmpeg's built-in notchlc decoder, following the existing native-container codec pattern (FLIC, HAP, etc.). No FFmpeg reconfigure needed since all decoders are compiled in by default. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Unlike the RGB-group codecs it was grouped with, NotchLC's decode_init() ignores codec_tag and bits_per_coded_sample and unconditionally sets pix_fmt and full color info, so the shared color_range/color_space assignment (and its comment) don't apply. Split it into a standalone no-op case with an accurate comment. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ffmpeg's NotchLC decoder outputs a YUV-family planar format tagged with the
RGB/identity matrix, which zscale/zimg rejects ("YUV color family cannot have
RGB matrix coefficients"), dropping every frame to black. Relabel to the
memory-identical GBR-planar format so it takes an RGB conversion path.
INCOMPLETE: colour is still wrong (green cast).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… GBR FFmpeg's notchlc decoder emits full-range BT.709 YUV (yuva444p12le) but mislabels the matrix as RGB/identity (AVCOL_SPC_RGB). The previous commit worked around zscale's "YUV family + RGB matrix" rejection by relabeling the planes as the memory-identical gbrap12le. That routed Y->Green, Cb->Blue, Cr->Red with no matrix applied, scrambling the image (green/magenta cast). Instead, correct the matrix tag to AVCOL_SPC_BT709 and leave the format as yuv. The frame then takes the normal YUV->RGB path (zscale), which converts full-range 709 correctly. Verified against Big Buck Bunny (known reference) and a brand-logo sample: both render with natural colour. Still guarded to yuva444p12le so genuine RGB/GBR codecs (QTRLE, HAP, DXV, FLIC) keep taking the RGB path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Marginal
reviewed
Jul 12, 2026
Marginal
reviewed
Jul 12, 2026
Marginal
requested changes
Jul 12, 2026
Marginal
left a comment
Owner
There was a problem hiding this comment.
Thanks. And thanks for providing a test sample.
Happy to merge once you've made a couple of changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tested with https://samples.ffmpeg.org/V-codecs/NotchLC/big_buck_bunny%20NotchLC%20Optimal%20Encoding%201920.mov
Alpha videos have artifacts but that is an ffmpeg bug.