Conversation
Implement NEON-optimized DCT transforms for ARM64 architecture: - DCT 8x8, 16x16, 32x32 for 8/10/12-bit video - Runtime CPU detection for ARM (NEON is mandatory on ARMv8) - Proper CMake integration for ARM architecture detection - Fallback to C reference when SIMD unavailable New files: - arm/dct-neon.cpp: NEON DCT implementations - arm/dct-neon.h: Function declarations - arm/neon-utils.h: Transpose and helper functions - arm/entropy-neon.cpp: Placeholder for future optimization Output is bit-exact with C reference implementation. Tested on Apple Silicon (M-series).
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.
Implement NEON-optimized DCT transforms for ARM64 architecture:
New files:
Output is bit-exact with C reference implementation. Tested on Apple Silicon (M-series).
Disclaimer: The majority of this code was generated with Claude Opus 4.5 and manually reviewed by me. The output was verified to be the same as when compared with #86 — I could not get the
stablebranch to run on my Mac otherwise. I realize there may be concerns regarding the use of LLMs for open-source projects like this because they do shift the reviewing burden to the maintainers. Also, the case could be made that I do not fully understand what every line of code does. This is true – I did not dive intosource/lib/analyzer/simd/arm/dct-neon.cppmuch. But I think that in this case there are quite a few benefits from making this application work on Apple Silicon, and I would not have been able to write and test this myself as easily.Also note: the code is partly inspired by x265's DCT implementation which is licensed under GPL v2.0 or later, so it's compatible with this repo.