From a28e61eff72ad878c4fb81f4f1fd82930972dc87 Mon Sep 17 00:00:00 2001 From: siivonek Date: Mon, 12 Sep 2022 14:59:08 +0300 Subject: [PATCH] [isp] Fix CI errors. --- src/encode_coding_tree.c | 7 ++++--- src/encode_coding_tree.h | 2 +- src/intra.c | 17 ----------------- src/intra.h | 3 ++- src/strategies/avx2/encode_coding_tree-avx2.h | 2 +- .../generic/encode_coding_tree-generic.c | 2 +- .../generic/encode_coding_tree-generic.h | 2 +- src/strategies/strategies-encode.h | 2 +- 8 files changed, 11 insertions(+), 26 deletions(-) diff --git a/src/encode_coding_tree.c b/src/encode_coding_tree.c index 96feb36c..0a867bb6 100644 --- a/src/encode_coding_tree.c +++ b/src/encode_coding_tree.c @@ -465,7 +465,7 @@ void uvg_encode_last_significant_xy(cabac_data_t * const cabac, static void encode_chroma_tu( encoder_state_t* const state, - cu_loc_t *cu_loc, + const cu_loc_t *cu_loc, int depth, cu_info_t* cur_pu, int8_t* scan_idx, @@ -1880,12 +1880,13 @@ void uvg_encode_mvd(encoder_state_t * const state, * \param lcu_width LCU_WIDTH for luma, LCU_WIDTH_C for chroma. * */ -void uvg_get_sub_coeff(coeff_t *dst, const coeff_t * const src, const int lcu_x, const int lcu_y, const int block_w, const int block_h, const int lcu_width) +void uvg_get_sub_coeff(const coeff_t *dst, const coeff_t * const src, const int lcu_x, const int lcu_y, const int block_w, const int block_h, const int lcu_width) { // Take subset of coeff array + coeff_t* dst_ptr = dst; const coeff_t* coeff_ptr = &src[lcu_x + lcu_y * lcu_width]; for (int j = 0; j < block_h; ++j) { //memcpy(dst_coeff + (j * lcu_width), &coeff[j * tr_width], tr_width * sizeof(coeff_t)); - memcpy(&dst[j * block_w], &coeff_ptr[j * lcu_width], block_w * sizeof(coeff_t)); + memcpy(&dst_ptr[j * block_w], &coeff_ptr[j * lcu_width], block_w * sizeof(coeff_t)); } } diff --git a/src/encode_coding_tree.h b/src/encode_coding_tree.h index 5b4ce324..575f4afd 100644 --- a/src/encode_coding_tree.h +++ b/src/encode_coding_tree.h @@ -117,7 +117,7 @@ void uvg_encode_last_significant_xy(cabac_data_t * const cabac, uint8_t width, uint8_t height, uint8_t type, uint8_t scan, double* bits_out); -void uvg_get_sub_coeff(coeff_t* dst, const coeff_t* const src, +void uvg_get_sub_coeff(const coeff_t* dst, const coeff_t* const src, const int lcu_x, const int lcu_y, const int block_w, const int block_h, const int lcu_width); diff --git a/src/intra.c b/src/intra.c index 61d479d6..51a53f15 100644 --- a/src/intra.c +++ b/src/intra.c @@ -978,23 +978,6 @@ static void intra_predict_regular( } -int get_isp_ref_pixels_num(const int lcu_x, const int lcu_y, const int width, const int height, const int isp_mode) -{ - // TODO: this only works until non-square blocks are implemented - const int block_size = MAX(width, height); - const int split_size = MIN(width, height); - if (isp_mode == ISP_MODE_HOR) { - int ref_pix_left = LCU_WIDTH - lcu_y; - } - else if (isp_mode == ISP_MODE_VER) { - - } - else { - assert(false && "This should never trigger."); - } -} - - void uvg_intra_build_reference_any( const cu_loc_t* const pu_loc, const cu_loc_t* const cu_loc, diff --git a/src/intra.h b/src/intra.h index c59ec497..f324c4fa 100644 --- a/src/intra.h +++ b/src/intra.h @@ -117,7 +117,8 @@ void uvg_intra_build_reference( uvg_intra_references *const refs, bool entropy_sync, uvg_pixel *extra_refs, - uint8_t multi_ref_idx); + uint8_t multi_ref_idx, + const uint8_t isp_mode); /** * \brief Generate intra predictions. diff --git a/src/strategies/avx2/encode_coding_tree-avx2.h b/src/strategies/avx2/encode_coding_tree-avx2.h index fa4ec8d5..ea7f077e 100644 --- a/src/strategies/avx2/encode_coding_tree-avx2.h +++ b/src/strategies/avx2/encode_coding_tree-avx2.h @@ -45,7 +45,7 @@ void uvg_encode_coeff_nxn_avx2(encoder_state_t * const state, cabac_data_t * const cabac, const coeff_t *coeff, - cu_loc_t *loc, + const cu_loc_t *loc, uint8_t type, int8_t scan_mode, int8_t tr_skip, diff --git a/src/strategies/generic/encode_coding_tree-generic.c b/src/strategies/generic/encode_coding_tree-generic.c index d0c87f4a..8d9ca61d 100644 --- a/src/strategies/generic/encode_coding_tree-generic.c +++ b/src/strategies/generic/encode_coding_tree-generic.c @@ -54,7 +54,7 @@ void uvg_encode_coeff_nxn_generic(encoder_state_t * const state, cabac_data_t * const cabac, const coeff_t *coeff, - cu_loc_t *cu_loc, + const cu_loc_t *cu_loc, uint8_t color, int8_t scan_mode, cu_info_t* cur_cu, diff --git a/src/strategies/generic/encode_coding_tree-generic.h b/src/strategies/generic/encode_coding_tree-generic.h index 09255deb..26682a61 100644 --- a/src/strategies/generic/encode_coding_tree-generic.h +++ b/src/strategies/generic/encode_coding_tree-generic.h @@ -44,7 +44,7 @@ void uvg_encode_coeff_nxn_generic(encoder_state_t * const state, cabac_data_t * const cabac, const coeff_t *coeff, - cu_loc_t *loc, + const cu_loc_t *loc, uint8_t color, int8_t scan_mode, cu_info_t* cur_cu, diff --git a/src/strategies/strategies-encode.h b/src/strategies/strategies-encode.h index 2bffacca..625f4005 100644 --- a/src/strategies/strategies-encode.h +++ b/src/strategies/strategies-encode.h @@ -49,7 +49,7 @@ typedef unsigned (encode_coeff_nxn_func)(encoder_state_t * const state, cabac_data_t * const cabac, const coeff_t *coeff, - cu_loc_t *loc, + const cu_loc_t *loc, uint8_t color, int8_t scan_mode, cu_info_t* cur_cu,