Repository navigation
feat(freevision): add isolated zero-permission NDK soak module - #8
Merged
Merged
Conversation
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
Adds the isolated
:freevisionAndroid Gradle/NDK library module (io.freesilicon.freevision) underfreevision/with zero dependencies on:appor any user-data store so it can graduate cleanly to a standalonefreesilicon/freevisionpackage.What's Included
pframe_gate(freevision/src/main/cpp/{include/freevision/pframe_gate.h,src/pframe_gate.c}):AHardwareBuffer(0x10100 = GPU_SAMPLED_IMAGE | VIDEO_ENCODE) P-frame wake classification (FV_WAKE_STATIC,FV_WAKE_SUBTLE,FV_WAKE_SCROLL,FV_WAKE_MOTION,FV_WAKE_KEYFRAME) for hardware HEVC/AV1CQ(bitrate-mode=0,max-bframes=0,video-encoding-statistics-level=1).VBR/CBRrate-control drift guard (fails closed unlessallow_qp_normalized_vbr && encoding_statistics_level == 1, applying QP normalization and drift detection).1080pslice-height=1088validator (fv_nv12_validate_input_size).fv_pframe_eval_with_fallback) when hardware codecs orAHardwareBufferpaths are unavailable.dpu_planes(freevision/src/main/cpp/{include/freevision/dpu_planes.h,include/freevision/ndk_mock.h,src/dpu_planes.c,src/dpu_tx_android.cpp}):ASurfaceTransactionhardware overlay planner (81.0xkRgb,4kRgbYuvwith writeback reserve,2kRcddecoration planes) with SRAM DMA (512, align64) and scaler (144, align36) checks.RGB_888rejection,R8_UNORMGPU fallback,64-px/64-byte stride validator, and silent GPU-composition fallback (fv_dpu_submit_plan_with_fallback).ASurfaceTransactionC++17 NDK wrapper (dpu_tx_android.cpp) keeping all core C modules pure C11 (-std=c11 -Wall -Wextra -Werror -Wpedantic).freevision/src/main/cpp/src/freevision_jni.c,freevision/src/main/java/io/freesilicon/freevision/FreeVisionWakeFilter.kt):FreeVisionWakeFilterwrapper with silent JVM CPU fallback if native loading is unavailable.<uses-permission>declarations infreevision/src/main/AndroidManifest.xml.settings.gradle.kts,build.gradle.kts,gradle/libs.versions.toml,scripts/check-zero-permissions.sh,.github/workflows/ci.yml)::freevisioninsettings.gradle.ktsandandroid-libraryplugin alias ingradle/libs.versions.toml.PT_LOAD >= 0x4000(-Wl,-z,max-page-size=16384) onlibfreevision.soanduseLegacyPackaging = false.scripts/check-zero-permissions.shand.github/workflows/ci.ymlto run host C11/C++17 + ASan/UBSan + CMake/CTest,:freevision:assembleDebug/assembleRelease, zero-permission checks, and 16 KiB ELF alignment checks.Verification
make -C freevision test(C11 + C++17 smoke): 8/8 passedmake -C freevision testwith-fsanitize=address,undefined: 8/8 passedctest: 1/1 passed (test_freevision)./gradlew --no-daemon :freevision:assembleDebug :freevision:assembleRelease: BUILD SUCCESSFULllvm-readelf -lW libfreevision.so(fromfreevision-release.aar): allLOADsegments0x4000(16 KiB) aligned./scripts/check-zero-permissions.sh: 0<uses-permission>tags across source and merged debug/release manifests./scripts/clean-room-audit.sh: PASSED across 75 files (0 errors)