Commit graph

17 commits

Author SHA1 Message Date
Narayan Kalaburgi
5782c001a3 libhevc: Implement HBD 444 chroma inv txfm & Recon
This commit adds the core math and CTB integration required for
inverse transform and reconstruction of 10-bit 4:4:4 chroma blocks.

Changes include:
- Added `ihevc_hbd_chroma_itrans_recon_32x32.c` to support the
  maximum 32x32 chroma block size required by the 444 profile.
- Added 10-bit chroma recon functions in `ihevc_hbd_chroma_recon.c`.
- Updated CTB decoding in `ihevcd_iquant_itrans_recon_ctb.c` to
  dynamically calculate 10-bit QP indices for 444 chroma blocks while
  preserving the original 420 fallback behavior.
- Updated headers with new HBD function declarations.
2026-08-14 21:34:32 +00:00
Harish Mahendrakar
2a74434513 Few minor cleanups in headers to minimize the differences with main branch
Some checks failed
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
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
3d2cafda86 Remove few more unnecessary changes from HBD path 2026-08-09 23:47:45 +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
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
b8c9100658 Remove incorrect prefix from ihevcd_itrans_res_dc
Some checks are pending
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
Sushant
646ee99888 libhevc: Direct memcpy and memset calls to enable _FORTIFY_SOURCE
Some checks failed
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
2f827d5db0 libhevcdec: Update deblock modules for yuv422 format
Test: ./hevcdec

Change-Id: I40411c04ab00d7e23843eb1d033c4543e3ec66e9
2026-05-21 08:22:42 -07:00
Vivek R Jadhav
98462a6e46 libhevcdec: Unify ihevcd_function_selector_generic.c and ihevcd_function_selector_noneon.c
Test: ./hevcdec

Change-Id: I40411c04ab00d7e23843eb1d033c4943e3ec56e5
2026-05-07 07:00:35 -07:00
Ram Mohan M
ad0a6d8688 hevcdec: add itrans residue functions
These functions are similar to ihevc_itrans_recon_* with the exception
that instead of computing recon directly they store residue to the
destination buffer. This helps with additional transformation of the
residue coefficients (rotation, rdpcm, ccp) before adding to the
prediction data to generate the final recon.

Test: Build
Change-Id: I9f84e66f5e9595162335cb152a6329a0f8d23337
2026-03-04 12:32:03 -08:00
Harish Mahendrakar
2cf1cc917d decoder: Change function pointer argument to avoid passing codec_t 2026-02-28 22:39:33 +05:30
Vivek Jadhav
8cbcc58d4a libhevcdec: Remove support for YUV422 ile, RGB565 and RGBA8888 output formats
Some checks are pending
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (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
These color formats are no longer supported. The decoder now returns
an error if configured for any of these output formats

Test: ./hevcdec

Change-Id: I944c539000f26898d5985cd6806f2968d4365f63
2026-02-14 12:54:18 -08:00
Rakesh Kumar
c4245ca34c hevcdec: add intra pred chroma reference samples filtering functions
Test: ./hevcdec

Change-Id: I3972d5ccb09a087a173dfe264ff885a5e55d3118
2026-02-13 07:43:12 -08:00
Rakesh Kumar
464af74ef0 hevcdec: add 32x32 chroma inverse trans recon functions
Test: ./hevcdec
Change-Id: I6d02a519738727257392d7d13b187c998e8e82d5
2026-02-13 07:43:12 -08:00
Rakesh Kumar
c684b4fd98 hevcdec: add 444 specific yuv color space conversion functions
Added 444 specific yuv color conversion functions. This change
only include function definition, call to these functions are
not enabled.

Test: ./hevcdec

Change-Id: I26a727d5e24c22c31f8188b38b980bd545251187
2026-02-10 07:14:13 -08:00
Harish Mahendrakar
0d8951cef4 Initial Version of HEVC decoder
Compliant to reference software HM11.0 onwards

Bug: 14571712
Change-Id: I8af25c1221cc6ab70440141c4d9b48c1ac69696a
2014-05-21 18:14:55 -07:00