mirror of
https://github.com/ittiam-systems/libhevc.git
synced 2026-10-05 18:21:18 +07:00
Currently, libhevc maintains two separate implementations for inverse
transform residual functions: ihevc_itrans_res_* and ihevc_hbd_itrans_res_*.
Since both 8-bit and HBD inverse transform residual routines output signed
16-bit residuals (WORD16 *pi2_dst), the only algorithmic difference between
8-bit and HBD variants is the 2nd stage shift:
Stage 1 shift: IT_SHIFT_STAGE_1 = 7 (fixed across all bit depths)
Stage 2 shift: shift = 20 - bit_depth
- 8-bit: 20 - 8 = 12 (IT_SHIFT_STAGE_2)
- 10-bit: 20 - 10 = 10
This commit cleans up the entire itrans_res family (4x4_ttype1, 4x4, dc, 8x8,
16x16, 32x32) as follows:
1. common/ihevc_itrans_res.h & common/ihevc_itrans_res.c:
- Add 'UWORD8 bit_depth' parameter to ihevc_itrans_res_* function
signatures and typedefs.
- Replace hardcoded 'shift = IT_SHIFT_STAGE_2;' with 'shift = 20 - bit_depth;'.
- Remove obsolete ihevc_hbd_itrans_res_* prototypes and typedefs.
2. common/ihevc_hbd_itrans_res.c:
- Delete file (~2,335 redundant lines removed).
3. Update tests/common/ihevc_itrans_res_test.cc to test bit depths 8 and 10
|
||
|---|---|---|
| .. | ||
| Android.bp | ||
| BitsBuf.cpp | ||
| BitsBuf.h | ||
| BitsFile.cpp | ||
| BitsFile.h | ||
| common.cmake | ||
| func_selector.cc | ||
| func_selector.h | ||
| helpers.cmake | ||
| ihevc_chroma_inter_pred_test.cc | ||
| ihevc_chroma_intra_pred_test.cc | ||
| ihevc_chroma_itrans_recon_test.cc | ||
| ihevc_chroma_recon_test.cc | ||
| ihevc_deblk_test.cc | ||
| ihevc_itrans_recon_test.cc | ||
| ihevc_itrans_res_test.cc | ||
| ihevc_itrans_test.cc | ||
| ihevc_luma_inter_pred_test.cc | ||
| ihevc_luma_intra_pred_test.cc | ||
| ihevc_mem_fns_test.cc | ||
| ihevc_padding_test.cc | ||
| ihevc_recon_test.cc | ||
| ihevc_sao_test.cc | ||
| ihevc_weighted_pred_test.cc | ||
| Md5Wrapper.cpp | ||
| Md5Wrapper.h | ||
| RawBuf.cpp | ||
| RawBuf.h | ||
| RawFile.cpp | ||
| RawFile.h | ||
| TestCommon.cc | ||
| TestCommon.h | ||
| TestEnums.h | ||