Repository navigation
Conversation
…ylib libphf/phf#2 added an options argument to phf_encode_memory(). The encoder now passes { PHF_MODE_MED, PHF_EFFORT_FAST }: a fixed mode for camera and video frames, encoded once without trials. PHFEncoder(mode=...) allows PALETTE for screen content. - bin/libphf.dylib rebuilt from libphf/phf 1cb1f80 (universal, macOS 11+, no OpenMP, depends only on libSystem). - encoder.py encodes one pixel at startup and refuses a library built before the options argument (it would read the options pointer as out_size and return empty frames). bin/phf.dll is such a library; the README says so and how to rebuild it. Measured with a Node WebSocket client on Apple M3 Pro: webcam 1080p 27.8 -> 30.0 fps; video files 720p/1080p stay at 30 fps with no gaps; live frames decode with the new phf.wasm (rc 0, no transparent pixels). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 tasks done
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.
Summary
Follow-up to libphf/phf#2, which added an
optionsargument tophf_encode_memory():server/encoder.pypasses{ PHF_MODE_MED, PHF_EFFORT_FAST }: the stream fixes its mode up front and encodes every frame once, without trial encodes.PHFEncoder(mode=PHF_MODE_PALETTE)is available for screen content.bin/libphf.dylibrebuilt from libphf/phf1cb1f80(universal arm64 + x86_64, macOS 11+, no OpenMP, onlylibSystem).out_sizeand returns empty frames instead of failing.bin/phf.dllpredates the new signature, so on Windows the server now stops at startup with a clear error instead of streaming empty frames. It needs a rebuild from libphf/phfmainwith MSVC; there is no Windows cross-compiler on the machine this was prepared on.bin/README.mddocuments this.Test plan
libphf.dylibwith the "predates phf_encode_options_t" error.web/phf.js+web/phf.wasm(rc 0, no transparent pixels).bin/phf.dlland test on Windows.🤖 Generated with Claude Code