Rakesh Kumar
efa8b27448
hevcdec: Enable assembly and intrinsic intra prediction functions for 444 and 422 chroma formats
...
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, clang, , clang++, macos-latest-clang-cmake, macos-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, -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++, 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
Remove generic C overrides for chroma and luma intra prediction in ihevcd_init_function_ptr_rext_generic to allow architecture-specific assembly and SIMD intrinsics to be used during 422 and 444 decoding.
2026-08-12 03:37:56 +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
Sushant
d629b12768
hevcdec: fix statcoeff placement for persistent rice adaptation
...
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
According to the ITU Specs (9.3.3.11) the statCoeff for
persistent rice adaptation must only be updated when the
parsing of coeff_abs_level_remaining is actually triggered.
Earlier, the i1_update_stats was incorrectly placed outside,
resulting stateCoeff getting incorrectly updated for the
first coefficient of every sub-block, and corrupting it.
Test: ./hevcdec
Change-Id: I7535ced74c18f55a7aff31d1c6d6d68f4a28f2cd
2026-06-24 22:51:07 -07:00
SABITHSAHEB
8260aefeb9
fix oob chroma source read in ihevcd_fmt_conv_422sp_to_420p
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-06-23 09:21:08 +05:30
Harish Mahendrakar
a3336a27f4
Include ihevcd_defs.h and ihevcd_structs.h in risc function selector
2026-06-22 20:01:44 -07:00
Harish Mahendrakar
75dd175c3d
Pass remaining bytes when reinitializing bitstream structure after tile or slice
...
This fixes OOB access in HEVC encoder when writing SEI message
Fixes #96
2026-06-22 10:53:19 +05:30
Harish Mahendrakar
86c57003fe
Add required typecasts to fix warnings
2026-06-20 16:59:17 -07:00
Harish Mahendrakar
ee8d6c7d8d
CMakeLists.txt: Fix warnings seen in cmake
2026-06-20 10:47:09 -07:00
Harish Mahendrakar
8d8fba095c
Enforce C99 in cmake builds
2026-06-20 10:41:06 -07:00
SABITHSAHEB
5ad6b71310
hevcdec: avoid signed left shift overflow building coeff bitmasks
2026-06-20 10:34:06 -07:00
Sushant
281bad69de
hevcdec: undo changes made for chroma intra pred lut
...
changes were made to chroma intra pred look up tables in the
context frext profile support. The corresponding assembly
changes were not yet merged but the tables are. The table
changes are now reverted keeping lut and assemblies in sync.
This reverts commit f990e295bd .
Change-Id: I9a7d929621b423b3bdd8e5dcbd0eeacc036675ed
2026-06-19 22:37:43 -07:00
Sushant
a38474db72
hevcdec: revert armv7 and armv8 deblocking support for frext
...
Test: ./hevcdec
Change-Id: I7a469f57aa57b8f692c690b3ac46aca68c2e481d
2026-06-19 14:24:33 -07:00
Sushant
646ee99888
libhevc: Direct memcpy and memset calls to enable _FORTIFY_SOURCE
...
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
Bypass wrappers functions for memcpy and memset, calling standard
C library functions directly. This allows _FORTIFY_SOURCE to
perform compile-time safety checks.
Bug: 514722372
Test: ./hevcdec
Change-Id: Id9faf0919ecedfd1833d40a7fbf6ddac454628b4
2026-06-18 06:44:56 -07:00
Vivek R Jadhav
e7d529d271
hevcdec: add support for chroma qp offset list
...
Test: ./hevcdec
Change-Id: I40411c04ab00d7e23843eb1d033c4943e3ec86e8
2026-06-18 06:42:01 -07:00
Vivek R Jadhav
a0296d9951
libhevcdec: Fix number of TU's allocated for YUV422
...
Fixed num of TU and subTU allocated for YUV422
Test: ./hevcdec
Change-Id: I40411c04ab00d7e23843ea1d033c4943e4ec66e5
2026-06-16 22:04:47 -07:00
Vivek R Jadhav
12f3dd4499
hevc_dec_fuzzer: Update fuzzer for YUV_422 format
...
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
Test: ./hevc_dec_fuzzer
2026-06-12 06:56:47 -07:00
Harish Mahendrakar
0d2132c3ac
Revert "Revert "libhevcdec: allow YUV422 format for decoding""
...
This reverts commit 97c1736f2d .
2026-06-11 22:48:24 -07:00
Vivek R Jadhav
df5c27d45d
libhevcdec: Add SAO boundary checks
...
For 16x16 CTB sizes in chroma processing, au4_idx_tl[5] and
au4_idx_tl[6] can be set to -1 at picture boundaries. Added guards to
check that the index is valid (> idx_tl) before dereferencing the slice
header list.
Bug: 516422427
Test: ./hevc_dec_fuzzer
Change-Id: I40411c04ab00d7e23843eb1d033c6953e3ec76e9
2026-06-11 22:33:05 -07:00
Vivek R Jadhav
091042fa3e
libhevcdec: Update static allocation for SAO context
...
Corrected the static SAO buffer size calculation to match the
partitioned buffer bounds. Luma requires 4x and Chroma requires 8x
MAX_CTB_SIZE * MAX_CTB_SIZE, which is now correctly summed to allocate
12x MAX_CTB_SIZE * MAX_CTB_SIZE bytes per process thread.
Bug: 484436016
Test: ./hevc_dec_fuzzer
Change-Id: I40411c04ab00d7e23843eb1d033d4943e3ec76a9
2026-06-11 21:46:30 -07:00
Sushant
343fd870f9
hevcdec: Update cabac context tables of cbcr_cbf trafo depth 4
...
When decoding YUV444 streams with QuadtreeTUMaxDepthIntra set to 5,
the chroma transform split depth can reach 4, since chroma TUs split
down to 4x4, matching luma. During parsing of cbf_cb and cbf_cr, the
context index is derived as IHEVC_CAB_CBCR_IDX + trafo_depth.
Since YUV420 limits max chroma trafo_depth to 3 (min chroma TU size 8x8),
only 4 contexts were allocated for IHEVC_CAB_CBCR_IDX (offsets 0-3).
When trafo_depth reaches 4, this caused an OOB access into the
neighboring IHEVC_CAB_TFM_SKIP0 context, corrupting CABAC state.
This change resolves the OOB access by:
1. Increasing the size of IHEVC_CAB_CBCR_IDX from 4 to 5 in the enum,
so that IHEVC_CAB_TFM_SKIP0 starts at IHEVC_CAB_CBCR_IDX + 5.
2. Inserting the 5th init context value (initValue = 1) at index 40
of each QP row in gau1_ihevc_cab_ctxts, across all 156 QP tables,
as per the HEVC spec (ITU-T H.265 section 9.3.2.2).
Test: ./hevcdec -c test.cfg
Change-Id: Ib06dcd728c76e414710bb4865e100d979a34a308
2026-06-11 09:10:21 -07:00
Vivek R Jadhav
1ff848b02a
hevc_dec_fuzzer: Fix output buffer allocation size calculation and add YUV444P as output format
...
This prevents a heap buffer overflow write of size 1 during format
conversion when decoding stream with odd dimensions.
Bug: 517027631
Test: ./hevc_dec_fuzzer
Change-Id: I40411c04ab00d7e23843eb1d033c4543e3ec66e9
2026-06-10 06:59:36 -07:00
Ram Mohan M
57d79be23a
updates to odd dimensions support - 2
...
- reduce unused memory allocations
- revert unrequired alignments done to widths and height in format
conversion leaf functions
- pass correct strides and base address to leaf functions
fixes oss-fuzz-520748344
Change-Id: I8b783d1dae8c53b68a6d3a32dbc3ffb16376851e
2026-06-07 16:06:11 -07:00
Harish Mahendrakar
1fac8cc5fe
Updates to odd dimension support.
...
Reverted some of the unnecessary changes from commit: f6ef16b0f9
- Restored the format conversion structure prior to f6ef16b0f9
- No need to handle odd stride for 420 and 422 output.
- Dimensions for output format 444 and 400 format can be odd
Tested with few YUV444 and YUV400 odd dimension clips
To generate:
$ ffmpeg -f lavfi -i testsrc=s=511x511 -c:v libx265 -pix_fmt yuv444p -t 1 -tag:v hvc1 y444_511x511.hevc
$ ffmpeg -f lavfi -i testsrc=s=511x511 -c:v libx265 -pix_fmt gray -t 1 -tag:v hvc1 y400_511x511.hevc
To decode using hevcdec for YUV420 output format
$ hevcdec -i y444_511x511.hevc -o y444_511x511.yuv --save_output 1 --num_frames -1 --chroma_format YUV_420P --enable_yuv_format 31
$ hevcdec -i y400_511x511.hevc -o y400_511x511.yuv --save_output 1 --num_frames -1 --chroma_format YUV_420P --enable_yuv_format 31
To decode using hevcdec for YUV444 output format
$ hevcdec -i y444_511x511.hevc -o y444_511x511.yuv --save_output 1 --num_frames -1 --chroma_format YUV_444P --enable_yuv_format 31
To decode using hevcdec for YUV400 output format
$ hevcdec -i y400_511x511.hevc -o y400_511x511.yuv --save_output 1 --num_frames -1 --chroma_format GRAY --enable_yuv_format 31
Display resulting output using ffplay by passing `-f rawvideo -pixel_format yuv420p -video_size 511x511`
Change pixel_format to yuv420p/yuv444p/gray based on decoder chroma_format argument
2026-06-05 11:42:40 -07:00
Vivek R Jadhav
f6ef16b0f9
libhevcdec: Add support for odd dimensions
...
Decoding streams with odd resolutions previously caused integer truncation
during right-shift or division operations, leading to incorrect buffer size
and stride calculations.
This is fixed by applying the ALIGN2 macro to width and height across buffer
metrics, dimension queries, and outargs to safely pad boundaries.
Test: ./hevcdec
Change-Id: I5c432aa63b0975b76baa5e59a816278087b65215
2026-06-05 10:53:38 -07:00
Vivek R Jadhav
1f0d11ce8f
libhevcdec: update chroma deblocking masks and BS shifts for YUV422/YUV444
...
Apply 0xAAAAAAAA mask for vertical chroma deblocking on YUV422 and YUV444.
Apply 0xAAAAAAAA mask for horizontal chroma deblocking on YUV444.
Add array indexing shifts for YUV422/YUV444 when log2_ctb_size != 6.
Test: ./hevcdec
Change-Id: I40411c04ab00d7e23843eb1d033c5943e3ec75e9
2026-06-03 09:40:02 -07:00