mirror of
https://github.com/ittiam-systems/libhevc.git
synced 2026-10-06 02:31:18 +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 | ||
| Android.bp | ||
| common.cmake | ||
| ihevc_buf_mgr.c | ||
| ihevc_buf_mgr.h | ||
| ihevc_cabac_tables.c | ||
| ihevc_cabac_tables.h | ||
| ihevc_chroma_intra_pred.h | ||
| ihevc_chroma_intra_pred_filters.c | ||
| ihevc_chroma_iquant_itrans_recon.c | ||
| ihevc_chroma_iquant_itrans_recon.h | ||
| ihevc_chroma_iquant_recon.c | ||
| ihevc_chroma_iquant_recon.h | ||
| ihevc_chroma_itrans_recon.c | ||
| ihevc_chroma_itrans_recon.h | ||
| ihevc_chroma_itrans_recon_8x8.c | ||
| ihevc_chroma_itrans_recon_16x16.c | ||
| ihevc_chroma_itrans_recon_32x32.c | ||
| ihevc_chroma_recon.c | ||
| ihevc_chroma_recon.h | ||
| ihevc_common_tables.c | ||
| ihevc_common_tables.h | ||
| ihevc_deblk.h | ||
| ihevc_deblk_edge_filter.c | ||
| ihevc_deblk_tables.c | ||
| ihevc_deblk_tables.h | ||
| ihevc_debug.h | ||
| ihevc_defs.h | ||
| ihevc_disp_mgr.c | ||
| ihevc_disp_mgr.h | ||
| ihevc_dpb_mgr.c | ||
| ihevc_dpb_mgr.h | ||
| ihevc_error.h | ||
| ihevc_func_types.h | ||
| ihevc_function_selector.h | ||
| ihevc_function_selector_generic.c | ||
| ihevc_hbd_chroma_intra_pred_filters.c | ||
| ihevc_hbd_chroma_iquant_recon.c | ||
| ihevc_hbd_chroma_itrans_recon.c | ||
| ihevc_hbd_chroma_itrans_recon_8x8.c | ||
| ihevc_hbd_chroma_itrans_recon_16x16.c | ||
| ihevc_hbd_chroma_itrans_recon_32x32.c | ||
| ihevc_hbd_chroma_recon.c | ||
| ihevc_hbd_deblk_edge_filter.c | ||
| ihevc_hbd_inter_pred_filters.c | ||
| ihevc_hbd_intra_pred_filters.c | ||
| ihevc_hbd_iquant_recon.c | ||
| ihevc_hbd_itrans_recon.c | ||
| ihevc_hbd_itrans_recon_8x8.c | ||
| ihevc_hbd_itrans_recon_16x16.c | ||
| ihevc_hbd_itrans_recon_32x32.c | ||
| ihevc_hbd_itrans_res.c | ||
| ihevc_hbd_padding.c | ||
| ihevc_hbd_recon.c | ||
| ihevc_hbd_sao.c | ||
| ihevc_hbd_tables_x86_intr.h | ||
| ihevc_hbd_weighted_pred.c | ||
| ihevc_inter_pred.h | ||
| ihevc_inter_pred_filters.c | ||
| ihevc_intra_pred.h | ||
| ihevc_intra_pred_filters.c | ||
| ihevc_iquant_itrans_recon.c | ||
| ihevc_iquant_itrans_recon.h | ||
| ihevc_iquant_recon.c | ||
| ihevc_iquant_recon.h | ||
| ihevc_itrans.c | ||
| ihevc_itrans.h | ||
| ihevc_itrans_recon.c | ||
| ihevc_itrans_recon.h | ||
| ihevc_itrans_recon_8x8.c | ||
| ihevc_itrans_recon_16x16.c | ||
| ihevc_itrans_recon_32x32.c | ||
| ihevc_itrans_res.c | ||
| ihevc_itrans_res.h | ||
| ihevc_macros.h | ||
| ihevc_mem_fns.c | ||
| ihevc_mem_fns.h | ||
| ihevc_padding.c | ||
| ihevc_padding.h | ||
| ihevc_quant_iquant_ssd.c | ||
| ihevc_quant_iquant_ssd.h | ||
| ihevc_quant_tables.c | ||
| ihevc_quant_tables.h | ||
| ihevc_recon.c | ||
| ihevc_recon.h | ||
| ihevc_resi_trans.c | ||
| ihevc_resi_trans.h | ||
| ihevc_sao.c | ||
| ihevc_sao.h | ||
| ihevc_structs.h | ||
| ihevc_tables_x86_intr.h | ||
| ihevc_trans.h | ||
| ihevc_trans_macros.h | ||
| ihevc_trans_tables.c | ||
| ihevc_trans_tables.h | ||
| ihevc_typedefs.h | ||
| ihevc_weighted_pred.c | ||
| ihevc_weighted_pred.h | ||
| ithread.c | ||
| ithread.h | ||
| iv.h | ||
| ivd.h | ||