mirror of
https://github.com/ittiam-systems/libhevc.git
synced 2026-10-02 16:52:43 +07:00
No description
Currently, libhevc maintains two separate implementations for inverse
transform residual functions: ihevc_itrans_res_* and ihevc_hbd_itrans_res_*.
Since both 8-bit and HBD inverse transform residual routines output signed
16-bit residuals (WORD16 *pi2_dst), the only algorithmic difference between
8-bit and HBD variants is the 2nd stage shift:
Stage 1 shift: IT_SHIFT_STAGE_1 = 7 (fixed across all bit depths)
Stage 2 shift: shift = 20 - bit_depth
- 8-bit: 20 - 8 = 12 (IT_SHIFT_STAGE_2)
- 10-bit: 20 - 10 = 10
This commit cleans up the entire itrans_res family (4x4_ttype1, 4x4, dc, 8x8,
16x16, 32x32) as follows:
1. common/ihevc_itrans_res.h & common/ihevc_itrans_res.c:
- Add 'UWORD8 bit_depth' parameter to ihevc_itrans_res_* function
signatures and typedefs.
- Replace hardcoded 'shift = IT_SHIFT_STAGE_2;' with 'shift = 20 - bit_depth;'.
- Remove obsolete ihevc_hbd_itrans_res_* prototypes and typedefs.
2. common/ihevc_hbd_itrans_res.c:
- Delete file (~2,335 redundant lines removed).
3. Update tests/common/ihevc_itrans_res_test.cc to test bit depths 8 and 10
|
||
|---|---|---|
| .github/workflows | ||
| .vscode | ||
| cmake | ||
| common | ||
| decoder | ||
| encoder | ||
| examples | ||
| fuzzer | ||
| tests | ||
| Android.bp | ||
| CMakeLists.txt | ||
| FrameInfo.md | ||
| libhevc_blocklist.txt | ||
| LICENSE | ||
| METADATA | ||
| MODULE_LICENSE_APACHE2 | ||
| NOTICE | ||
| OWNERS | ||
| PREUPLOAD.cfg | ||
| README.md | ||
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