No description
Find a file
Harish Mahendrakar 052d028555 Fix heap-buffer-overflow in HBD padding due to bit depth change.
Trigger IVD_RES_CHANGED when bit depth or chroma format changes in SPS,
forcing reallocation of picture buffers.

To prevent corrupting the codec state on invalid SPS parses, the updates to
global codec parameters (like i4_pixel_size_y and i4_bit_depth_luma) are
deferred to the end of ihevcd_parse_sps, after all validation checks have
passed. The resolution change check now compares the old active values in
ps_codec against the newly parsed values in the temporary ps_sps structure.

TAG=agy
CONV=2aef6402-f7fc-4ff8-ba56-d78e01754035
2026-08-07 03:21:32 +00:00
.github/workflows cmake.yml: Add runners to build arm and aarch63 builds 2026-02-22 20:55:28 -08:00
.vscode Rename test folder as examples 2026-04-13 12:02:22 +05:30
cmake Add initial tests for decoder and encoder 2026-07-27 13:15:45 -07:00
common [hbd] Fix OOB reads in HBD sao functions 2026-08-07 03:21:32 +00:00
decoder Fix heap-buffer-overflow in HBD padding due to bit depth change. 2026-08-07 03:21:32 +00:00
encoder Pass remaining bytes when reinitializing bitstream structure after tile or slice 2026-06-22 10:53:19 +05:30
examples libhevcdec: Add support for extended profile parsing from SPS headers 2026-08-07 03:21:32 +00:00
fuzzer Move IVD_ARCH_T and IVD_SOC_T to iv.h and rename as IV_ARCH_T and IV_SOC_T 2026-07-29 15:37:52 -07:00
tests Added support for 420 10-bit decoding. 2026-08-07 03:21:32 +00:00
Android.bp refactor: clean up SAO and ILF padding code 2026-05-24 10:11:19 -07:00
CMakeLists.txt Add initial tests for decoder and encoder 2026-07-27 13:15:45 -07:00
FrameInfo.md Decoder: add support for QP and block_type map export in library 2022-08-04 11:40:43 +05:30
libhevc_blocklist.txt Remove assembly functions from CFI blocklist 2021-01-21 16:26:15 -08:00
LICENSE Add LICENSE to fix lint warning 2023-01-25 17:14:53 -08:00
METADATA Add METADATA to libhevc: Apache2=NOTICE 2020-04-28 08:53:23 -07:00
MODULE_LICENSE_APACHE2 Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
NOTICE Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
OWNERS OWNERS: Include avic_OWNERS 2023-08-11 15:54:49 -07:00
PREUPLOAD.cfg point to new repo hooks for mainline uploads 2020-05-26 15:17:47 -07:00
README.md libhevc: Enable support for MacOS 2024-10-01 06:37:42 -07:00

LIBHEVC

Getting Started Document

LibHEVC build steps

Supports:

  • aarch32/aarch64 on Linux.
  • aarch32/aarch64 on Android.
  • x86_32/x86_64 on Linux.
  • aarch64 on Mac.
  • x86_64 on Mac.

Native Builds

Use the following commands for building on the target machine

$ cd external/libhevc
$ mkdir build
$ cd build
$ cmake ..
$ make

Cross-compiler based builds

Building for x86_32 on a x86_64 Linux machine

$ cd external/libhevc
$ mkdir build
$ cd build
$ CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" cmake ..
$ make

Building for aarch32/aarch64

Update 'CMAKE_C_COMPILER', 'CMAKE_CXX_COMPILER', 'CMAKE_C_COMPILER_AR', and 'CMAKE_CXX_COMPILER_AR' in CMAKE_TOOLCHAIN_FILE passed below

$ cd external/libhevc
$ mkdir build
$ cd build

For aarch64

$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake
$ make

For aarch32

$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake
$ make

Building for android

NOTE: This assumes that you are building on a machine that has Android NDK.

$ cd external/libhevc
$ mkdir build
$ cd build

Armv7 (32-bit)

cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/android_toolchain.cmake\
    -DHEVC_ANDROID_NDK_PATH=/opt/android-ndk-r26d/\
    -DANDROID_ABI=armeabi-v7a\
    -DANDROID_PLATFORM=android-23 ../
make

Armv8 (64-bit)

cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/android_toolchain.cmake\
    -DHEVC_ANDROID_NDK_PATH=/opt/android-ndk-r26d/\
    -DANDROID_ABI=arm64-v8a\
    -DANDROID_PLATFORM=android-23 ../
make