[libopenapv] Add dimension validation in dec_frm_prepare Validates that the provided image buffer (imgb) has sufficient dimensions to accommodate the frame being decoded as specified in the Frame PBU header. This prevents a heap buffer overflow when Frame PBU dimensions are larger than those in AU_INFO (which are used for buffer allocation). Bug: 492492028 Test: oapv_repro (local test program) Flag: EXEMPT BUGFIX Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:cf05ca54cffdb52567dbdc30ebc7eeff46b75e05 Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:21d001689dd36663a1dfd93ce36f41114146affc Merged-In: I7d3f778d519343d6d20f00ea84346e7dd4d984a7 Change-Id: I7d3f778d519343d6d20f00ea84346e7dd4d984a7
OpenAPV provides the reference implementation of the APV codec which can be used to record professional-grade video and associated metadata without quality degradation. OpenAPV is free and open source software provided by LICENSE.
The OpenAPV supports the following features:
The APV codec is a professional video codec, which was developed in response to the need for professional level high quality video recording and post production. The primary purpose of the APV codec is for use in professional video recording and editing workflows for various types of content.
APV codec utilizes technologies known to be over 20 years old to achieve a royalty free codec. APV builds a video codec using only conventional coding technologies, which consist of traditional methods published between the early 1980s and the end of the 1990s.
The APV codec standard has the following features:
Build Requirements
For ARM
For Windows (crosscompile)
Build Instructions PC (Linux)
cmake -DCMAKE_BUILD_TYPE=Release -S . -B build cmake --build build
Build Instructions ARM (Crosscompile)
cmake -S . -B build-arm -DCMAKE_TOOLCHAIN_FILE=arm64_toolchain.cmake -DCMAKE_BUILD_TYPE=Release cmake --build build-arm
Build Instructions Windows (Crosscompile)
cmake -S . -B build-windows -DCMAKE_TOOLCHAIN_FILE=windows_x86_64_toolchain.cmake -DCMAKE_BUILD_TYPE=Release cmake --build build-windows
Build Instructions macOS (Apple Silicon)
cmake -S . -B build-darwin -DUNIVERSAL=FALSE -DCMAKE_OSX_ARCHITECTURES=arm64 -DARM=1 -DCMAKE_BUILD_TYPE=Release cmake --build build-darwin
Build Instructions macOS (Universal)
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=macos_universal_toolchain.cmake -DUNIVERSAL=1 -DCMAKE_BUILD_TYPE=Release cmake --build build
Build Instructions iOS (ARM64)
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=ios_arm64_toolchain.cmake -DCMAKE_BUILD_TYPE=Release cmake --build build
Output Location
Encoder requires raw YCbCr file (422, 444), 10-bit or more, as input.
Displaying help:
oapv_app_enc --help
Encoding:
oapv_app_enc -i input_1920x1080_yuv422_10bit.yuv -w 1920 -h 1080 -d 10 -z 30 --input-csp 2 -o encoded.apv oapv_app_enc -i input.y4m -o encoded.apv
Decoder output can be in yuv or y4m formats.
Displaying help:
oapv_app_dec --help
Decoding:
oapv_app_dec -i encoded.apv -o output.y4m
Pattern file of APV bitstream for ImHex is provided here.
In build directory run ctest
To generate a code coverage report manually:
lcov is required.
Build and Test with Coverage:
# Create build directory and configure with coverage enabled cmake -S . -B build -DENABLE_COVERAGE=ON # Build the project cmake --build build # Run tests to generate coverage data cd build && ctest && cd ..
Generate HTML Report:
# Capture coverage data lcov --capture --directory build --output-file build/coverage.info # Remove coverage for external files (optional) lcov --remove build/coverage.info '/usr/*' --output-file build/coverage.info # Generate the HTML report mkdir -p coverage_report genhtml build/coverage.info --output-directory coverage_report
View Report: Open coverage_report/index.html in your web browser.
For generating package ready for distribution (default deb) execute in build directory cpack, or other formats (tgz, zip etc.) cpack -G TGZ.
This project is using the following versioning scheme API-SET.MAJOR.MINOR.PATCH. It's mostly based on Semantic Versioning with addition of API-SET on first place. Project and library share a common version number.
See LICENSE file for details.