mirror of
https://github.com/ittiam-systems/libhevc.git
synced 2026-10-02 08:42:42 +07:00
|
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
This commit implements HBD inverse transform residual functions, which is a prerequisite to enable 10-bit decoding with Cross Component Prediction (CCP). When CCP is enabled, the inverse transform and prediction addition cannot be performed in a single pass (`itrans_recon`). Instead, the decoder must first compute the unclipped transform residuals (`itrans_res`), scale them for CCP, and then add the prediction. For 10-bit bitstreams, the decoder was missing HBD implementations for `itrans_res` and improperly falling back to 8-bit implementations. This resulted in the use of an incorrect second-stage inverse transform shift (hardcoded to 12 instead of `20 - bit_depth`), significantly corrupting the residuals. Key Changes: 1. Created `common/ihevc_hbd_itrans_res.c` providing mathematically compliant HBD implementations of `itrans_res` for all Transform Unit sizes (4x4, 8x8, 16x16, 32x32, and DC) using intermediate `CLIP_S16` logic and dynamic bit-depth shifting (`20 - bit_depth`). 2. Implemented `ihevc_hbd_chroma_recon_nxn_ccp` to properly scale 10-bit residuals with the cross-component alpha and add the prediction. 3. Modified `ihevcd_iquant_itrans_resi_recon_tu_plane` to dynamically branch to `ps_codec->apf_hbd_itrans_res` and `ihevc_hbd_chroma_recon_nxn_ccp` when `pixel_size > 1`. This cleanly handles 10-bit CCP while keeping 8-bit paths untouched. |
||
|---|---|---|
| .. | ||
| arm | ||
| arm64 | ||
| riscv64 | ||
| x86 | ||
| ihevcd_api.c | ||
| ihevcd_bitstream.c | ||
| ihevcd_bitstream.h | ||
| ihevcd_boundary_strength.c | ||
| ihevcd_boundary_strength.h | ||
| ihevcd_cabac.c | ||
| ihevcd_cabac.h | ||
| ihevcd_common_tables.c | ||
| ihevcd_common_tables.h | ||
| ihevcd_cxa.h | ||
| ihevcd_deblk.c | ||
| ihevcd_deblk.h | ||
| ihevcd_debug.h | ||
| ihevcd_decode.c | ||
| ihevcd_decode.h | ||
| ihevcd_defs.h | ||
| ihevcd_error.h | ||
| ihevcd_fmt_conv.c | ||
| ihevcd_fmt_conv.h | ||
| ihevcd_func_types.h | ||
| ihevcd_function_selector.h | ||
| ihevcd_function_selector_generic.c | ||
| ihevcd_get_mv.c | ||
| ihevcd_get_mv.h | ||
| ihevcd_ilf_padding.h | ||
| ihevcd_inter_pred.c | ||
| ihevcd_inter_pred.h | ||
| ihevcd_intra_pred_mode_prediction.c | ||
| ihevcd_intra_pred_mode_prediction.h | ||
| ihevcd_iquant_itrans_recon_ctb.c | ||
| ihevcd_iquant_itrans_recon_ctb.h | ||
| ihevcd_itrans_recon_dc.c | ||
| ihevcd_itrans_recon_dc.h | ||
| ihevcd_ittiam_logo.h | ||
| ihevcd_job_queue.c | ||
| ihevcd_job_queue.h | ||
| ihevcd_mv_merge.c | ||
| ihevcd_mv_merge.h | ||
| ihevcd_mv_pred.c | ||
| ihevcd_mv_pred.h | ||
| ihevcd_nal.c | ||
| ihevcd_nal.h | ||
| ihevcd_parse_headers.c | ||
| ihevcd_parse_headers.h | ||
| ihevcd_parse_residual.c | ||
| ihevcd_parse_residual.h | ||
| ihevcd_parse_slice.c | ||
| ihevcd_parse_slice.h | ||
| ihevcd_parse_slice_header.c | ||
| ihevcd_parse_slice_header.h | ||
| ihevcd_process_slice.c | ||
| ihevcd_process_slice.h | ||
| ihevcd_profile.h | ||
| ihevcd_ref_list.c | ||
| ihevcd_ref_list.h | ||
| ihevcd_sao.c | ||
| ihevcd_sao.h | ||
| ihevcd_statistics.h | ||
| ihevcd_structs.h | ||
| ihevcd_trace.h | ||
| ihevcd_utils.c | ||
| ihevcd_utils.h | ||
| ihevcd_version.c | ||
| libhevcdec.cmake | ||