Vivek R Jadhav
2542723ccc
libhevcdec: Fix chroma deblocking QP derivation for YUV422 HBD
...
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Waiting to run
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Waiting to run
Include CHROMA_FMT_IDC_YUV422 in the check to bypass chroma QP mapping in HBD deblocking (both vertical and horizontal filters).
2026-08-13 01:17:59 +00:00
Vivek R Jadhav
c4025d1ec0
libhevcdec: Fix chroma QP derivation for YUV422 HBD
...
Bypass 420 chroma QP mapping table for YUV422 and YUV444 in HBD path.
2026-08-13 01:17:59 +00:00
Vivek R Jadhav
c8c9eb7e0b
libhevcdec: Add support for conversion from 422 10 bit to 420 10 bit
...
Test: ./hevcdec
2026-08-13 01:17:59 +00:00
Vivek R Jadhav
51c80727c3
libhevcdec: Add initial support for YUV422 10 bit
...
Test: ./hevcdec
2026-08-13 01:17:59 +00:00
Harish Mahendrakar
2a74434513
Few minor cleanups in headers to minimize the differences with main branch
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Has been cancelled
2026-08-12 05:24:06 +00:00
Rakesh Kumar
35eb80040b
Remove dead dependency on decoder e_profile in hbd branch
...
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Waiting to run
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Waiting to run
Remove vestigial HEVC_DEC_PROFILE_T enum and e_profile member from codec_t, along with its hardcoded initialization in ihevcd_init and assignment block in ihevcd_parse_sps. All dynamic bit depth, pixel size, and function selection logic in HBD relies directly on bitstream syntax elements.
TAG=agy
CONV=af8f01f3-0862-4fb5-a5ce-b37c3025b633
2026-08-11 19:49:05 +00:00
Harish Mahendrakar
c5ad9a03e3
Remove SAO wrapper
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Has been cancelled
2026-08-09 23:47:45 +00:00
Harish Mahendrakar
d301b27547
Cleanup unnecessary changes in main.c
2026-08-09 23:47:45 +00:00
Harish Mahendrakar
18947ba8fd
decoder: Clean up HBD function pointers and rename to match convention
...
- Rename pf_hbd_ prefixed function pointers in func_selector_t to use _fptr suffix consistently.
- Update usages of renamed function pointers.
- Clean up HBD function pointer tables (remove ihevcd_hbd_func_tables.c/h).
- Implement HBD function pointer arrays in codec_t.
TAG=agy
CONV=51cc5812-336f-4b5f-990d-34fbf4d5ef08
2026-08-09 23:47:45 +00:00
Harish Mahendrakar
01e8270cc1
Move HEVC_DEC_PROFILE_T to ihevcd_structs.h
2026-08-09 23:47:45 +00:00
Harish Mahendrakar
0476888b1f
decoder: Remove unused pv_parse_residual_coding
...
Remove the unused function pointer pv_parse_residual_coding from
codec_t and its initialization in ihevcd_init. The function
ihevcd_parse_residual_coding is already called directly.
TAG=agy
CONV=9b39e0bf-8a07-4122-9bb2-81ec77fbdc09
2026-08-09 23:47:45 +00:00
Harish Mahendrakar
442d944cb5
decoder: Refactor pv_iquant_itrans_recon_ctb to direct call
...
Remove the function pointer pv_iquant_itrans_recon_ctb from codec_t
and call ihevcd_iquant_itrans_recon_ctb directly. This removes
unnecessary indirection since there is only one implementation.
TAG=agy
CONV=9b39e0bf-8a07-4122-9bb2-81ec77fbdc09
2026-08-09 23:47:45 +00:00
Harish Mahendrakar
32813e2432
decoder: Move pf_sao_shift_ctb from sao_ctxt_t to direct wrapper call
...
Remove the function pointer pf_sao_shift_ctb from sao_ctxt_t.
Instead of using a function pointer in codec_t, call a new wrapper
function ihevcd_sao_shift_ctb_wrapper directly. The wrapper dynamically
dispatches to 8-bit or 10-bit implementation based on stream bit depth.
TAG=agy
CONV=9b39e0bf-8a07-4122-9bb2-81ec77fbdc09
2026-08-09 23:47:45 +00:00
Harish Mahendrakar
3d2cafda86
Remove few more unnecessary changes from HBD path
2026-08-09 23:47:45 +00:00
Harish Mahendrakar
0f1eb6bc09
Cleanup few more unnecessary changes from HBD path
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Waiting to run
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Waiting to run
2026-08-09 05:13:29 +00:00
Harish Mahendrakar
0cc032d9ff
Clean up HBD support before split
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Has been cancelled
2026-08-07 17:25:44 +00:00
Harish Mahendrakar
a30bb77acf
Fix hevc_dec_fuzzer to support High Bit Depth (HBD) allocations.
...
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Waiting to run
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Waiting to run
The fuzzer previously allocated output buffers assuming 8-bit depth (1 byte
per pixel) even when decoding HBD streams (10-bit), which use 2 bytes per
pixel (stored as 16-bit). This led to heap-buffer-overflow during format
conversion in ihevcd_fmt_conv.
This fix:
1. Adds mBitDepth tracking to the Codec class in the fuzzer.
2. Updates allocFrame to scale buffer sizes by 2 if bit depth > 8.
3. Updates decodeHeader and decodeFrame to detect bit depth changes from
dec_op.s_disp_frm_buf.u4_y_bit_depth and trigger reallocation when it
changes, similar to resolution changes.
TAG=agy
CONV=2aef6402-f7fc-4ff8-ba56-d78e01754035
2026-08-07 03:21:32 +00:00
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
Harish Mahendrakar
ac413106a1
[hbd] Fix OOB reads in HBD sao functions
2026-08-07 03:21:32 +00:00
Harish Mahendrakar
b82feca867
temporary fix for buffer handling
2026-08-07 03:21:32 +00:00
Harish Mahendrakar
2b721db6f3
Initialize s_ptl in ihevcd_parse_sps to avoid use of uninitialized values
2026-08-07 03:21:32 +00:00
Harish Mahendrakar
ebee97d75a
Limit support to max bit depth of 10-bit
2026-08-07 03:21:32 +00:00
Rakesh Kumar
eacaf4768e
libhevcdec: Add support for extended profile parsing from SPS headers
...
- Update ihevcd_parse_sps to parse profile dynamically from clip SPS (profile_idc, chroma format, bit depth, intra and still constraint flags).
- Add support for Main, Main 10, Main 10 Still, Main 422 10, Main 444, Main 444 10, Main Intra, Main 10 Intra, Main 422 10 Intra, Main 444 Intra, Main 444 10 Intra, and Main 444 Still Picture profiles.
- Allow profile_idc == 4 (RExt) in SPS profile validation checks.
- Update pixel size determination in ihevcd_api.c for 8-bit vs 10-bit profiles.
- Add CLI argument parsing for new profiles in main.c.
2026-08-07 03:21:32 +00:00
Harish Mahendrakar
18fc8f6b52
Added support for 420 10-bit decoding.
...
This is the initial version and doesn't enable SIMD functions yet.
Has not been tested extensively yet.
This is not ready to be merged into main branch yet.
2026-08-07 03:21:32 +00:00
Sushant
9e7d8a24a3
libhevcdec: update assembly support for implicit RDPCM
...
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Has been cancelled
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Has been cancelled
Test: ./hevcdec
Change-Id: I013e44e024258f2f84690fdc0109200109042026
2026-08-05 14:37:42 +00:00
Vivek R Jadhav
d61070bafe
libhevc: Update intrinsic for implicit RDPCM
...
Test: ./hevcdec
Change-Id: I013e44e024258f2f84690fdc0109200109042035
2026-08-05 14:37:42 +00:00
Sushant
b9239efd75
hevcdec: Add assemblies and intrinsics for intra prediction
...
TODO: SIMD acceleration
- chroma intra prediction modules for trans size 32
- chroma itrans recon for trans size 32
- all methods of ihevc_itrans_res.c
- ihevc_chroma_recon_nxn_ccp
- for neon, chroma padding needs fixing. The function assumes pad width
80 always which does not hold for 444 chroma format idc. for 444, pad
width is 160.
- ihevc_inter_pred_luma_horz_w16out_a9q causing bus error. This is seen
when building with cmake on local setup and for arch 32. On Aosp tree
this issue is not seen.
- format conversion routines added for 422 and 444
- implicit rdpcm allows disabling of filters for intra pred modes 10 and
26. The C functions are updated to support this. simd functions
requires updating.
TODO: au1_ref_sub_out array is on stack and this increased irrespective
of chroma format idc. Should this allocation make use of color format to
reduce stack size
TODO: check compliance for different sps range extension fields
TODO: enable deblocking support
TODO: enable sao support
TODO: enable slice and tile support
TODO: enable other 444 specific tool sets
TODO: add support for 422 for inter slices
Test: ./hevcdec
Change-Id: I013e44e024258f2f84690fdc0109200109052036
2026-08-05 14:37:42 +00:00
Harish Mahendrakar
dac3dc5e82
[common]Add new files for HBD
2026-08-05 13:27:29 +00:00
Vivek Jadhav
ce30a4b0e3
libhevcdec: Reapply deblocking assembly changes for YUV444 and YUV422
...
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Has been cancelled
Test: ./hevcdec
TODO: Add assemblies and intrinsics for deblocking 422
Change-Id: I40411c04ab00d7e23843eb1d033c4944e3ec66e9
2026-08-04 06:04:10 +00:00
Sushant
088f2c5319
hevcdec: assembly & intrincs for SAO
...
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Waiting to run
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Waiting to run
Test: ./hevcdec
Change-Id: I013e45e024258f2f84690fdcc01b4cd52f0fac52
2026-08-03 13:35:09 +00:00
Vivek R Jadhav
938dbd274d
libhevcdec: Fix chroma padding in ARM and ARM64 NEON assembly to support 160-byte width
...
For the 444 chroma format, the chroma pad width is 160 bytes. However, the ARM and ARM64 NEON chroma padding assembly functions previously assumed a hardcoded pad size of 80 bytes (writing exactly 5 stores of 16 bytes), leaving the rest of the padding region uninitialized.
Test: ./hevcdec
Change-Id: I013e44e024258f2f84690fdc0109200119042135
2026-08-03 13:30:17 +00:00
Vivek R Jadhav
6f423a375a
libhevcdec: Enable architecture-specific SIMD optimizations for 422 and 444
...
Previously, when 422 or 444 chroma formats were encountered, all
function pointers were overridden to generic C implementations due to
lack of support in optimized assemblies/intrinsics for certain
components.
This change introduces `ihevcd_init_function_ptr_rext` which:
- First initializes all function pointers with architecture-optimized
versions.
- Explicitly overrides only the components not yet optimized for 422/444 formats (intra prediction, SAO, deblocking and chroma padding) to point
back to their C implementations.
This allows other fully-compatible modules (e.g: inter prediction modes, transform/reconstruction, format conversion) to benefit from SIMD
optimizations on 422/444 formats without degrading YUV 420 decoding.
Test: ./hevcdec
Change-Id: I013e44e024258f2f84690fdc0109200129042145
2026-08-03 13:29:07 +00:00
Harish Mahendrakar
c76f16108e
Few more updates in tests to build in Android
...
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Waiting to run
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Waiting to run
Updated new tests to build in Android.
2026-08-02 20:17:13 +00:00
Harish Mahendrakar
9f7b41b36c
Update tests to run with atest
...
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Has been cancelled
Added Android.bp for the tests and updated them to ensure they run with atest.
2026-07-31 17:05:23 +00:00
Vivek Jadhav
a4cb498b8b
libhevcdec: Fix conformance issues for transform skip and implicit RDPCM
...
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Waiting to run
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Waiting to run
- disable_boundary_filter flag was not reset within the TU loop. This
caused the flag to remain sticky at 1 for all subsequent TUs in the
CTB once set by any TU.
- Transform-skip blocks larger than 4x4, the scaling/dequantization
matrix is bypassed and the scaling factor is set to a constant of 16
as per HEVC specification section 8.6.3.
- Bypassing the inverse transform for transform-skip blocks requires
applying a scaling of tsShift (Rec. ITU-T H.265 Section 8.6.2
Eq 8-296: tsShift = 5 + log2_trans_size) and descaling of bdShift
(Eq 8-295: bdShift = 20 - bit_depth).
Net shift: shift_ts = bdShift - tsShift
(20 - bit_depth) - (5 + log2_trans_size)
15 - bit_depth - log2_trans_size.
Test: ./hevcdec
Change-Id: I40411c04ab00d7e23842eb1d033c4543e4ec75e9
2026-07-30 09:36:12 -07:00
Harish Mahendrakar
b8c9100658
Remove incorrect prefix from ihevcd_itrans_res_dc
...
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Waiting to run
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Waiting to run
ihevcd_itrans_res_dc is defined in common folder but has a wrong prefix of ihevcd_.
This is now fixed to ihevc_.
2026-07-29 17:08:35 -07:00
Harish Mahendrakar
2358e96df3
Add few function selectors in common for modules defined in common.
...
This is needed to ensure that the tests in tests/common do not depend on
headers from decoder folder.
Decoder still has its own function selectors and those will be updated in subsequent
commits to use these common selectors to avoid code duplication.
2026-07-29 16:29:43 -07:00
Harish Mahendrakar
53f3deacd0
Remove redundant ihevc_func_selector.h
2026-07-29 15:59:08 -07:00
Harish Mahendrakar
8dffbdd2d0
Move IVD_ARCH_T and IVD_SOC_T to iv.h and rename as IV_ARCH_T and IV_SOC_T
...
This helps in decoupling unit tests in common from depending on ivd.h
2026-07-29 15:37:52 -07:00
Harish Mahendrakar
4a8c3163e3
Add initial tests for decoder and encoder
...
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Has been cancelled
Encoder tests currently do not dump recon as ihevce_plugin doesn't yet support recon dump.
This will be enabled once the recon dump is supported.
Decoder tests currently validate just a few files from big buck bunny.
Use "ctest" run all the tests when using cmake.
This downloads the required media files and uses them in the tests.
If running the tests directly using the test binaries, then download the media files
and export HEVC_TEST_DIR to the extracted folder before running the binaries directly.
2026-07-27 13:15:45 -07:00
Harish Mahendrakar
d37eb1267c
Add few more tests for SIMD functions
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Waiting to run
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Waiting to run
2026-07-26 23:09:41 -07:00
Harish Mahendrakar
6d1c41c75a
[cmake] Enable support for ctest
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Waiting to run
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Waiting to run
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Waiting to run
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Waiting to run
2026-07-26 09:01:18 -07:00
Harish Mahendrakar
5b7b5802f4
[cmake] Add support for generating coverage reports
...
use ENABLE_COVERAGE argument for cmake builds for enabling coverage
2026-07-26 09:01:00 -07:00
Harish Mahendrakar
18c957ab9c
[tests] Allocate extra bytes for x86 and x64 SIMD tests
...
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Has been cancelled
Few SSE42 and SSSE31 assemblies read additional bytes (due to 128bit reads) and to
avoid OOB access, the buffers are allocated for a larger size for x86/x64 tests.
2026-07-24 21:48:48 -07:00
Harish Mahendrakar
c53d85a402
Enable ARM mode in cmake for arm32 builds
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Has been cancelled
2026-07-20 16:15:10 -07:00
Sabith Saheb
41d029542e
fix oob top-left pu-map read in ihevcd_get_mv_ctb
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Has been cancelled
2026-07-14 07:25:34 -07:00
Sabith Saheb
1cef4c170f
fix oob slice-index read in ihevcd_sao_shift_ctb
2026-07-14 07:25:11 -07:00
Harish Mahendrakar
085f030e9e
Invoke ihevcd_free_dynamic_bufs() in ihevcd_allocate_dynamic_bufs()
...
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Has been cancelled
This will ensure that any memory that is allocated before and not yet freed, will be freed.
This is done as a precaution to ensure there are no leaks.
2026-07-13 00:08:29 -07:00
Sabith Saheb
c605590236
use unsigned word type in ihevcd_bits_seek to avoid signed shift ub
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Has been cancelled
2026-07-06 21:28:17 -07:00
Ram Mohan M
bc802ee605
hevcdec: update chroma subsample filter from neighbor to area
...
For clips with chroma format idc 444/422 and output format selected to
420, after decoding during chroma sampling conversion from 444/422 to
420, neighbor filtering is done currently. This is updated to area.
Test: ./hevcdec
Change-Id: I024886655084051093858c5c40a94c0373c64813
2026-07-02 10:09:50 -07:00