Lines Matching refs:ps_sao_ctxt
83 void ihevcd_sao_ctb(sao_ctxt_t *ps_sao_ctxt) in ihevcd_sao_ctb() argument
85 codec_t *ps_codec = ps_sao_ctxt->ps_codec; in ihevcd_sao_ctb()
116 ps_sps = ps_sao_ctxt->ps_sps; in ihevcd_sao_ctb()
119 src_strd = ps_sao_ctxt->ps_codec->i4_strd; in ihevcd_sao_ctb()
120 …pu1_src_luma = ps_sao_ctxt->pu1_cur_pic_luma + ((ps_sao_ctxt->i4_ctb_x + ps_sao_ctxt->i4_ctb_y * p… in ihevcd_sao_ctb()
121 …pu1_src_chroma = ps_sao_ctxt->pu1_cur_pic_chroma + ((ps_sao_ctxt->i4_ctb_x + ps_sao_ctxt->i4_ctb_y… in ihevcd_sao_ctb()
123 …ps_sao = ps_sao_ctxt->ps_pic_sao + ps_sao_ctxt->i4_ctb_x + ps_sao_ctxt->i4_ctb_y * ps_sps->i2_pic_… in ihevcd_sao_ctb()
136 … remaining_cols = ps_sps->i2_pic_width_in_luma_samples - (ps_sao_ctxt->i4_ctb_x << log2_ctb_size); in ihevcd_sao_ctb()
140 … remaining_rows = ps_sps->i2_pic_height_in_luma_samples - (ps_sao_ctxt->i4_ctb_y << log2_ctb_size); in ihevcd_sao_ctb()
144 … pu1_src_top_luma = ps_sao_ctxt->pu1_sao_src_top_luma + (ps_sao_ctxt->i4_ctb_x << log2_ctb_size); in ihevcd_sao_ctb()
145 …pu1_src_top_chroma = ps_sao_ctxt->pu1_sao_src_top_chroma + (ps_sao_ctxt->i4_ctb_x << log2_ctb_size… in ihevcd_sao_ctb()
146 … pu1_src_left_luma = ps_sao_ctxt->pu1_sao_src_left_luma + (ps_sao_ctxt->i4_ctb_y << log2_ctb_size); in ihevcd_sao_ctb()
147 …pu1_src_left_chroma = ps_sao_ctxt->pu1_sao_src_left_chroma + (ps_sao_ctxt->i4_ctb_y << log2_ctb_si… in ihevcd_sao_ctb()
149 pu1_no_loop_filter_flag = ps_sao_ctxt->pu1_pic_no_loop_filter_flag + in ihevcd_sao_ctb()
150 ((ps_sao_ctxt->i4_ctb_y * ctb_size) / 8) * loop_filter_strd + in ihevcd_sao_ctb()
151 ((ps_sao_ctxt->i4_ctb_x * ctb_size) / 64); in ihevcd_sao_ctb()
175 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_ctb()
186 if(ps_sps->i2_pic_wd_in_ctb - 1 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_ctb()
197 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_ctb()
208 if(ps_sps->i2_pic_ht_in_ctb - 1 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_ctb()
227 ps_sao_ctxt->pu1_sao_src_top_left_luma_curr_ctb[0] = pu1_src_top_luma[sao_wd_luma - 1]; in ihevcd_sao_ctb()
248 … ((((ps_sao_ctxt->i4_ctb_x << log2_ctb_size) - sao_wd_luma) / 8) % 8); in ihevcd_sao_ctb()
295 … ps_sao_ctxt->pu1_sao_src_top_left_luma_curr_ctb, in ihevcd_sao_ctb()
309 … ps_sao_ctxt->pu1_sao_src_top_left_luma_curr_ctb, in ihevcd_sao_ctb()
327 … (*(UWORD32 *)(pu1_no_loop_filter_flag + i * loop_filter_strd)) >> ((((ps_sao_ctxt->i4_ctb_x << lo… in ihevcd_sao_ctb()
376 … ps_sao_ctxt->pu1_sao_src_top_left_chroma_curr_ctb[0] = pu1_src_top_chroma[sao_wd_chroma - 2]; in ihevcd_sao_ctb()
377 … ps_sao_ctxt->pu1_sao_src_top_left_chroma_curr_ctb[1] = pu1_src_top_chroma[sao_wd_chroma - 1]; in ihevcd_sao_ctb()
396 … (*(UWORD32 *)(pu1_no_loop_filter_flag + i * loop_filter_strd)) >> ((((ps_sao_ctxt->i4_ctb_x << lo… in ihevcd_sao_ctb()
443 … ps_sao_ctxt->pu1_sao_src_top_left_chroma_curr_ctb, in ihevcd_sao_ctb()
462 … ps_sao_ctxt->pu1_sao_src_top_left_chroma_curr_ctb, in ihevcd_sao_ctb()
481 … (*(UWORD32 *)(pu1_no_loop_filter_flag + i * loop_filter_strd)) >> ((((ps_sao_ctxt->i4_ctb_x << lo… in ihevcd_sao_ctb()
526 void ihevcd_sao_shift_ctb(sao_ctxt_t *ps_sao_ctxt) in ihevcd_sao_shift_ctb() argument
528 codec_t *ps_codec = ps_sao_ctxt->ps_codec; in ihevcd_sao_shift_ctb()
576 WORD32 chroma_yuv420sp_vu = ps_sao_ctxt->is_chroma_yuv420sp_vu; in ihevcd_sao_shift_ctb()
584 ps_sps = ps_sao_ctxt->ps_sps; in ihevcd_sao_shift_ctb()
585 ps_pps = ps_sao_ctxt->ps_pps; in ihevcd_sao_shift_ctb()
586 ps_tile = ps_sao_ctxt->ps_tile; in ihevcd_sao_shift_ctb()
590 src_strd = ps_sao_ctxt->ps_codec->i4_strd; in ihevcd_sao_shift_ctb()
591 ps_slice_hdr_base = ps_sao_ctxt->ps_codec->ps_slice_hdr_base; in ihevcd_sao_shift_ctb()
592 ps_slice_hdr = ps_slice_hdr_base + (ps_sao_ctxt->i4_cur_slice_idx & (MAX_SLICE_HDR_CNT - 1)); in ihevcd_sao_shift_ctb()
594 pu1_slice_idx = ps_sao_ctxt->pu1_slice_idx; in ihevcd_sao_shift_ctb()
595 pu1_tile_idx = ps_sao_ctxt->pu1_tile_idx; in ihevcd_sao_shift_ctb()
596 …pu1_src_luma = ps_sao_ctxt->pu1_cur_pic_luma + ((ps_sao_ctxt->i4_ctb_x + ps_sao_ctxt->i4_ctb_y * p… in ihevcd_sao_shift_ctb()
597 …pu1_src_chroma = ps_sao_ctxt->pu1_cur_pic_chroma + ((ps_sao_ctxt->i4_ctb_x + ps_sao_ctxt->i4_ctb_y… in ihevcd_sao_shift_ctb()
600 …pu1_sao_src_top_left_luma_curr_ctb = ps_sao_ctxt->pu1_sao_src_top_left_luma_curr_ctb + ((ps_sao_ct… in ihevcd_sao_shift_ctb()
601 …pu1_sao_src_top_left_chroma_curr_ctb = ps_sao_ctxt->pu1_sao_src_top_left_chroma_curr_ctb + (2 * (p… in ihevcd_sao_shift_ctb()
602 …pu1_sao_src_luma_top_left_ctb = ps_sao_ctxt->pu1_sao_src_luma_top_left_ctb + ((ps_sao_ctxt->i4_ctb… in ihevcd_sao_shift_ctb()
603 …pu1_sao_src_chroma_top_left_ctb = ps_sao_ctxt->pu1_sao_src_chroma_top_left_ctb + (2 * ps_sao_ctxt-… in ihevcd_sao_shift_ctb()
604 …u1_sao_src_top_left_luma_bot_left = ps_sao_ctxt->u1_sao_src_top_left_luma_bot_left; // + ((ps_sao_… in ihevcd_sao_shift_ctb()
605 …pu1_sao_src_top_left_luma_bot_left = ps_sao_ctxt->pu1_sao_src_top_left_luma_bot_left + ((ps_sao_ct… in ihevcd_sao_shift_ctb()
606 …au1_sao_src_top_left_chroma_bot_left = ps_sao_ctxt->au1_sao_src_top_left_chroma_bot_left; // + (2 … in ihevcd_sao_shift_ctb()
607 …pu1_sao_src_top_left_chroma_bot_left = ps_sao_ctxt->pu1_sao_src_top_left_chroma_bot_left + (2 * ps… in ihevcd_sao_shift_ctb()
608 …pu1_sao_src_top_left_luma_top_right = ps_sao_ctxt->pu1_sao_src_top_left_luma_top_right + ((ps_sao_… in ihevcd_sao_shift_ctb()
609 …pu1_sao_src_top_left_chroma_top_right = ps_sao_ctxt->pu1_sao_src_top_left_chroma_top_right + (2 * … in ihevcd_sao_shift_ctb()
611 …ps_sao = ps_sao_ctxt->ps_pic_sao + ps_sao_ctxt->i4_ctb_x + ps_sao_ctxt->i4_ctb_y * ps_sps->i2_pic_… in ihevcd_sao_shift_ctb()
615 DEBUG_INIT_TMP_BUF(ps_sao_ctxt->pu1_tmp_buf_luma, ps_sao_ctxt->pu1_tmp_buf_chroma); in ihevcd_sao_shift_ctb()
634 …remaining_rows = ps_sps->i2_pic_height_in_luma_samples - ((ps_sao_ctxt->i4_ctb_y << log2_ctb_size)… in ihevcd_sao_shift_ctb()
635 …remaining_cols = ps_sps->i2_pic_width_in_luma_samples - ((ps_sao_ctxt->i4_ctb_x << log2_ctb_size) … in ihevcd_sao_shift_ctb()
641 pu1_src_tmp_luma -= ps_sao_ctxt->i4_ctb_x ? SAO_SHIFT_CTB : 0; in ihevcd_sao_shift_ctb()
642 pu1_src_tmp_luma -= ps_sao_ctxt->i4_ctb_y ? SAO_SHIFT_CTB * src_strd : 0; in ihevcd_sao_shift_ctb()
644 pu1_src_backup_luma = ps_sao_ctxt->pu1_tmp_buf_luma; in ihevcd_sao_shift_ctb()
646 loop_filter_bit_pos = (ps_sao_ctxt->i4_ctb_x << (log2_ctb_size - 3)) + in ihevcd_sao_shift_ctb()
647 … (ps_sao_ctxt->i4_ctb_y << (log2_ctb_size - 3)) * (loop_filter_strd << 3); in ihevcd_sao_shift_ctb()
648 if(ps_sao_ctxt->i4_ctb_x > 0) in ihevcd_sao_shift_ctb()
651 pu1_no_loop_filter_flag = ps_sao_ctxt->pu1_pic_no_loop_filter_flag + in ihevcd_sao_shift_ctb()
654 for(i = -(ps_sao_ctxt->i4_ctb_y ? SAO_SHIFT_CTB : 0) >> log2_min_cu; in ihevcd_sao_shift_ctb()
713 …remaining_rows = ps_sps->i2_pic_height_in_luma_samples - ((ps_sao_ctxt->i4_ctb_y << log2_ctb_size)… in ihevcd_sao_shift_ctb()
714 …remaining_cols = ps_sps->i2_pic_width_in_luma_samples - ((ps_sao_ctxt->i4_ctb_x << log2_ctb_size) … in ihevcd_sao_shift_ctb()
720 pu1_src_tmp_chroma -= ps_sao_ctxt->i4_ctb_x ? SAO_SHIFT_CTB * 2 : 0; in ihevcd_sao_shift_ctb()
721 pu1_src_tmp_chroma -= ps_sao_ctxt->i4_ctb_y ? SAO_SHIFT_CTB * src_strd : 0; in ihevcd_sao_shift_ctb()
723 pu1_src_backup_chroma = ps_sao_ctxt->pu1_tmp_buf_chroma; in ihevcd_sao_shift_ctb()
725 loop_filter_bit_pos = (ps_sao_ctxt->i4_ctb_x << (log2_ctb_size - 3)) + in ihevcd_sao_shift_ctb()
726 … (ps_sao_ctxt->i4_ctb_y << (log2_ctb_size - 3)) * (loop_filter_strd << 3); in ihevcd_sao_shift_ctb()
727 if(ps_sao_ctxt->i4_ctb_x > 0) in ihevcd_sao_shift_ctb()
730 pu1_no_loop_filter_flag = ps_sao_ctxt->pu1_pic_no_loop_filter_flag + in ihevcd_sao_shift_ctb()
733 for(i = -(ps_sao_ctxt->i4_ctb_y ? 2 * SAO_SHIFT_CTB : 0) >> log2_min_cu; in ihevcd_sao_shift_ctb()
781 DEBUG_PROCESS_TMP_BUF(ps_sao_ctxt->pu1_tmp_buf_luma, ps_sao_ctxt->pu1_tmp_buf_chroma); in ihevcd_sao_shift_ctb()
784 if(ps_sao_ctxt->i4_ctb_x > 0 && ps_sao_ctxt->i4_ctb_y > 0) in ihevcd_sao_shift_ctb()
797 WORD32 top_left_ctb_indx = (ps_sao_ctxt->i4_ctb_y - 1) * ps_sps->i2_pic_wd_in_ctb + in ihevcd_sao_shift_ctb()
798 (ps_sao_ctxt->i4_ctb_x - 1); in ihevcd_sao_shift_ctb()
806 …pu1_src_top_luma = ps_sao_ctxt->pu1_sao_src_top_luma + (ps_sao_ctxt->i4_ctb_x << log2_ctb_size) - … in ihevcd_sao_shift_ctb()
807 …pu1_src_top_chroma = ps_sao_ctxt->pu1_sao_src_top_chroma + (ps_sao_ctxt->i4_ctb_x << log2_ctb_size… in ihevcd_sao_shift_ctb()
808 …pu1_src_left_luma = ps_sao_ctxt->pu1_sao_src_left_luma + (ps_sao_ctxt->i4_ctb_y << log2_ctb_size) … in ihevcd_sao_shift_ctb()
809 …pu1_src_left_chroma = ps_sao_ctxt->pu1_sao_src_left_chroma + (ps_sao_ctxt->i4_ctb_y << log2_ctb_si… in ihevcd_sao_shift_ctb()
884 …if((0 == (1 << log2_ctb_size) - sao_wd_luma) && (ps_sao_ctxt->i4_ctb_y > 1) && (ps_sao_ctxt->i4_ct… in ihevcd_sao_shift_ctb()
886 ctby_tl_t = ps_sao_ctxt->i4_ctb_y - 2; in ihevcd_sao_shift_ctb()
887 ctbx_tl_l = ps_sao_ctxt->i4_ctb_x - 2; in ihevcd_sao_shift_ctb()
891 ctby_tl_t = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
892 ctbx_tl_l = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
894 ctbx_tl_t = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
895 ctby_tl_l = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
897 ctbx_tl_r = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
898 ctby_tl_r = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
900 ctbx_tl_d = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
901 ctby_tl_d = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
903 ctbx_tl = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
904 ctby_tl = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
919 if(ps_sao_ctxt->i4_ctb_x == 1) in ihevcd_sao_shift_ctb()
928 if(ps_sao_ctxt->i4_ctb_y == 1) in ihevcd_sao_shift_ctb()
948 if((0 == (ps_sao_ctxt->i4_ctb_x << log2_ctb_size) - sao_wd_luma)) in ihevcd_sao_shift_ctb()
957 if((0 == (ps_sao_ctxt->i4_ctb_y << log2_ctb_size) - sao_ht_luma)) in ihevcd_sao_shift_ctb()
1003 …if(((ps_tile->u1_pos_x == ps_sao_ctxt->i4_ctb_x) || (ps_tile->u1_pos_y == ps_sao_ctxt->i4_ctb_y)) … in ihevcd_sao_shift_ctb()
1019 if(ps_sao_ctxt->i4_ctb_x == 1) in ihevcd_sao_shift_ctb()
1028 if(ps_sao_ctxt->i4_ctb_y == 1) in ihevcd_sao_shift_ctb()
1066 if(0 == (ps_sao_ctxt->i4_ctb_x << log2_ctb_size) - sao_wd_luma) in ihevcd_sao_shift_ctb()
1073 if(ps_sps->i2_pic_wd_in_ctb == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
1080 if((0 == (ps_sao_ctxt->i4_ctb_y << log2_ctb_size) - sao_ht_luma)) in ihevcd_sao_shift_ctb()
1086 if(ps_sps->i2_pic_ht_in_ctb == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
1205 …if((0 == (1 << log2_ctb_size) - sao_wd_chroma) && (ps_sao_ctxt->i4_ctb_y > 1) && (ps_sao_ctxt->i4_… in ihevcd_sao_shift_ctb()
1207 ctby_tl_t = ps_sao_ctxt->i4_ctb_y - 2; in ihevcd_sao_shift_ctb()
1208 ctbx_tl_l = ps_sao_ctxt->i4_ctb_x - 2; in ihevcd_sao_shift_ctb()
1212 ctby_tl_t = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1213 ctbx_tl_l = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
1215 ctbx_tl_t = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
1216 ctby_tl_l = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1218 ctbx_tl_r = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
1219 ctby_tl_r = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1221 ctbx_tl_d = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
1222 ctby_tl_d = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
1224 ctbx_tl = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
1225 ctby_tl = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1239 if(ps_sao_ctxt->i4_ctb_x == 1) in ihevcd_sao_shift_ctb()
1248 if(ps_sao_ctxt->i4_ctb_y == 1) in ihevcd_sao_shift_ctb()
1263 if((0 == (ps_sao_ctxt->i4_ctb_x << log2_ctb_size) - sao_wd_chroma)) in ihevcd_sao_shift_ctb()
1272 … if((0 == (ps_sao_ctxt->i4_ctb_y << (log2_ctb_size - 1)) - sao_ht_chroma)) in ihevcd_sao_shift_ctb()
1313 …if(((ps_tile->u1_pos_x == ps_sao_ctxt->i4_ctb_x) || (ps_tile->u1_pos_y == ps_sao_ctxt->i4_ctb_y)) … in ihevcd_sao_shift_ctb()
1329 if(ps_sao_ctxt->i4_ctb_x == 1) in ihevcd_sao_shift_ctb()
1338 if(ps_sao_ctxt->i4_ctb_y == 1) in ihevcd_sao_shift_ctb()
1374 if(0 == (ps_sao_ctxt->i4_ctb_x << log2_ctb_size) - sao_wd_chroma) in ihevcd_sao_shift_ctb()
1380 if(ps_sps->i2_pic_wd_in_ctb == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
1387 if(0 == (ps_sao_ctxt->i4_ctb_y << (log2_ctb_size - 1)) - sao_ht_chroma) in ihevcd_sao_shift_ctb()
1393 if(ps_sps->i2_pic_ht_in_ctb == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
1405 if((ctb_size == 16) && (ps_sao_ctxt->i4_ctb_y != ps_sps->i2_pic_ht_in_ctb - 1)) in ihevcd_sao_shift_ctb()
1464 if((ps_sao_ctxt->i4_ctb_y > 0)) in ihevcd_sao_shift_ctb()
1479 WORD32 top_ctb_indx = (ps_sao_ctxt->i4_ctb_y - 1) * ps_sps->i2_pic_wd_in_ctb + in ihevcd_sao_shift_ctb()
1480 (ps_sao_ctxt->i4_ctb_x); in ihevcd_sao_shift_ctb()
1484 …remaining_cols = ps_sps->i2_pic_width_in_luma_samples - ((ps_sao_ctxt->i4_ctb_x << log2_ctb_size) … in ihevcd_sao_shift_ctb()
1489 …remaining_cols = ps_sps->i2_pic_width_in_luma_samples - ((ps_sao_ctxt->i4_ctb_x << log2_ctb_size) … in ihevcd_sao_shift_ctb()
1498 … pu1_src_top_luma = ps_sao_ctxt->pu1_sao_src_top_luma + (ps_sao_ctxt->i4_ctb_x << log2_ctb_size); in ihevcd_sao_shift_ctb()
1499 …pu1_src_top_chroma = ps_sao_ctxt->pu1_sao_src_top_chroma + (ps_sao_ctxt->i4_ctb_x << log2_ctb_size… in ihevcd_sao_shift_ctb()
1500 …pu1_src_left_luma = ps_sao_ctxt->pu1_sao_src_left_luma + (ps_sao_ctxt->i4_ctb_y << log2_ctb_size) … in ihevcd_sao_shift_ctb()
1501 …pu1_src_left_chroma = ps_sao_ctxt->pu1_sao_src_left_chroma + (ps_sao_ctxt->i4_ctb_y << log2_ctb_si… in ihevcd_sao_shift_ctb()
1577 ctbx_t_t = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
1578 ctby_t_t = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1580 ctbx_t_l = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
1581 ctby_t_l = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1583 ctbx_t_r = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
1584 ctby_t_r = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1586 ctbx_t_d = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
1587 ctby_t_d = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
1589 ctbx_t = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
1590 ctby_t = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1595 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
1612 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
1665 …if(((ps_tile->u1_pos_x == ps_sao_ctxt->i4_ctb_x) || (ps_tile->u1_pos_y == ps_sao_ctxt->i4_ctb_y)) … in ihevcd_sao_shift_ctb()
1671 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
1712 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
1719 … if(ps_sps->i2_pic_width_in_luma_samples - (ps_sao_ctxt->i4_ctb_x << log2_ctb_size) <= sao_wd_luma) in ihevcd_sao_shift_ctb()
1726 if(0 == (ps_sao_ctxt->i4_ctb_y << log2_ctb_size) - sao_ht_luma) in ihevcd_sao_shift_ctb()
1733 if(ps_sps->i2_pic_ht_in_ctb == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
1855 ctbx_t_t = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
1856 ctby_t_t = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1858 ctbx_t_l = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
1859 ctby_t_l = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1861 ctbx_t_r = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
1862 ctby_t_r = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1864 ctbx_t_d = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
1865 ctby_t_d = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
1867 ctbx_t = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
1868 ctby_t = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1872 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
1890 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
1939 …if(((ps_tile->u1_pos_x == ps_sao_ctxt->i4_ctb_x) || (ps_tile->u1_pos_y == ps_sao_ctxt->i4_ctb_y)) … in ihevcd_sao_shift_ctb()
1945 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
1984 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
1991 …if(ps_sps->i2_pic_width_in_luma_samples - (ps_sao_ctxt->i4_ctb_x << log2_ctb_size) <= sao_wd_chrom… in ihevcd_sao_shift_ctb()
1998 if(0 == (ps_sao_ctxt->i4_ctb_y << (log2_ctb_size - 1)) - sao_ht_chroma) in ihevcd_sao_shift_ctb()
2005 if(ps_sps->i2_pic_ht_in_ctb == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2072 if(ps_sao_ctxt->i4_ctb_x > 0) in ihevcd_sao_shift_ctb()
2086 WORD32 left_ctb_indx = (ps_sao_ctxt->i4_ctb_y) * ps_sps->i2_pic_wd_in_ctb + in ihevcd_sao_shift_ctb()
2087 (ps_sao_ctxt->i4_ctb_x - 1); in ihevcd_sao_shift_ctb()
2091 …remaining_rows = ps_sps->i2_pic_height_in_luma_samples - ((ps_sao_ctxt->i4_ctb_y << log2_ctb_size)… in ihevcd_sao_shift_ctb()
2096 …remaining_rows = ps_sps->i2_pic_height_in_luma_samples / 2 - ((ps_sao_ctxt->i4_ctb_y << (log2_ctb_… in ihevcd_sao_shift_ctb()
2105 …pu1_src_top_luma = ps_sao_ctxt->pu1_sao_src_top_luma + (ps_sao_ctxt->i4_ctb_x << log2_ctb_size) - … in ihevcd_sao_shift_ctb()
2106 …pu1_src_top_chroma = ps_sao_ctxt->pu1_sao_src_top_chroma + (ps_sao_ctxt->i4_ctb_x << log2_ctb_size… in ihevcd_sao_shift_ctb()
2107 … pu1_src_left_luma = ps_sao_ctxt->pu1_sao_src_left_luma + (ps_sao_ctxt->i4_ctb_y << log2_ctb_size); in ihevcd_sao_shift_ctb()
2108 …pu1_src_left_chroma = ps_sao_ctxt->pu1_sao_src_left_chroma + (ps_sao_ctxt->i4_ctb_y << log2_ctb_si… in ihevcd_sao_shift_ctb()
2183 ctbx_l_t = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
2184 ctby_l_t = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
2186 ctbx_l_l = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
2187 ctby_l_l = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2189 ctbx_l_r = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
2190 ctby_l_r = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2192 ctbx_l_d = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
2193 ctby_l_d = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2195 ctbx_l = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
2196 ctby_l = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2200 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2217 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2265 …if(((ps_tile->u1_pos_x == ps_sao_ctxt->i4_ctb_x) || (ps_tile->u1_pos_y == ps_sao_ctxt->i4_ctb_y)) … in ihevcd_sao_shift_ctb()
2270 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2310 if(0 == (ps_sao_ctxt->i4_ctb_x << log2_ctb_size) - sao_wd_luma) in ihevcd_sao_shift_ctb()
2316 if(ps_sps->i2_pic_wd_in_ctb == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
2323 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2330 …if(ps_sps->i2_pic_height_in_luma_samples - (ps_sao_ctxt->i4_ctb_y << log2_ctb_size) <= sao_ht_lum… in ihevcd_sao_shift_ctb()
2453 ctbx_l_t = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
2454 ctby_l_t = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
2456 ctbx_l_l = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
2457 ctby_l_l = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2459 ctbx_l_r = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
2460 ctby_l_r = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2462 ctbx_l_d = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
2463 ctby_l_d = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2465 ctbx_l = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
2466 ctby_l = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2470 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2487 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2533 …if(((ps_tile->u1_pos_x == ps_sao_ctxt->i4_ctb_x) || (ps_tile->u1_pos_y == ps_sao_ctxt->i4_ctb_y)) … in ihevcd_sao_shift_ctb()
2538 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2577 if(0 == (ps_sao_ctxt->i4_ctb_x << log2_ctb_size) - sao_wd_chroma) in ihevcd_sao_shift_ctb()
2584 if(ps_sps->i2_pic_wd_in_ctb == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
2591 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2598 …if(ps_sps->i2_pic_height_in_luma_samples / 2 - (ps_sao_ctxt->i4_ctb_y << (log2_ctb_size - 1)) <= … in ihevcd_sao_shift_ctb()
2612 … if((ctb_size == 16) && (ps_sao_ctxt->i4_ctb_x != ps_sps->i2_pic_wd_in_ctb - 1)) in ihevcd_sao_shift_ctb()
2686 …remaining_cols = ps_sps->i2_pic_width_in_luma_samples - ((ps_sao_ctxt->i4_ctb_x << log2_ctb_size) … in ihevcd_sao_shift_ctb()
2691 …remaining_cols = ps_sps->i2_pic_width_in_luma_samples - ((ps_sao_ctxt->i4_ctb_x << log2_ctb_size) … in ihevcd_sao_shift_ctb()
2697 …remaining_rows = ps_sps->i2_pic_height_in_luma_samples - ((ps_sao_ctxt->i4_ctb_y << log2_ctb_size)… in ihevcd_sao_shift_ctb()
2702 …remaining_rows = ps_sps->i2_pic_height_in_luma_samples / 2 - ((ps_sao_ctxt->i4_ctb_y << (log2_ctb_… in ihevcd_sao_shift_ctb()
2708 … pu1_src_top_luma = ps_sao_ctxt->pu1_sao_src_top_luma + (ps_sao_ctxt->i4_ctb_x << log2_ctb_size); in ihevcd_sao_shift_ctb()
2709 …pu1_src_top_chroma = ps_sao_ctxt->pu1_sao_src_top_chroma + (ps_sao_ctxt->i4_ctb_x << log2_ctb_size… in ihevcd_sao_shift_ctb()
2710 … pu1_src_left_luma = ps_sao_ctxt->pu1_sao_src_left_luma + (ps_sao_ctxt->i4_ctb_y << log2_ctb_size); in ihevcd_sao_shift_ctb()
2711 …pu1_src_left_chroma = ps_sao_ctxt->pu1_sao_src_left_chroma + (ps_sao_ctxt->i4_ctb_y << log2_ctb_si… in ihevcd_sao_shift_ctb()
2715 if(ps_sao_ctxt->ps_slice_hdr->i1_slice_sao_luma_flag) in ihevcd_sao_shift_ctb()
2786 ctbx_c_t = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
2787 ctby_c_t = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
2789 ctbx_c_l = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
2790 ctby_c_l = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2792 ctbx_c_r = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
2793 ctby_c_r = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2795 ctbx_c_d = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
2796 ctby_c_d = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2798 ctbx_c = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
2799 ctby_c = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2803 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
2814 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2829 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
2840 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2886 …if(((ps_tile->u1_pos_x == ps_sao_ctxt->i4_ctb_x) || (ps_tile->u1_pos_y == ps_sao_ctxt->i4_ctb_y)) … in ihevcd_sao_shift_ctb()
2891 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
2902 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2941 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
2948 … if(ps_sps->i2_pic_width_in_luma_samples - (ps_sao_ctxt->i4_ctb_x << log2_ctb_size) <= sao_wd_luma) in ihevcd_sao_shift_ctb()
2955 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2962 …if(ps_sps->i2_pic_height_in_luma_samples - (ps_sao_ctxt->i4_ctb_y << log2_ctb_size) <= sao_ht_lum… in ihevcd_sao_shift_ctb()
3006 if(ps_sao_ctxt->ps_slice_hdr->i1_slice_sao_chroma_flag) in ihevcd_sao_shift_ctb()
3090 ctbx_c_t = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
3091 ctby_c_t = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
3093 ctbx_c_l = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
3094 ctby_c_l = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
3096 ctbx_c_r = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
3097 ctby_c_r = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
3099 ctbx_c_d = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
3100 ctby_c_d = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
3102 ctbx_c = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
3103 ctby_c = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
3107 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
3118 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
3133 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
3145 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
3192 …if(((ps_tile->u1_pos_x == ps_sao_ctxt->i4_ctb_x) || (ps_tile->u1_pos_y == ps_sao_ctxt->i4_ctb_y)) … in ihevcd_sao_shift_ctb()
3197 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
3208 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
3247 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
3254 …if(ps_sps->i2_pic_width_in_luma_samples - (ps_sao_ctxt->i4_ctb_x << log2_ctb_size) <= sao_wd_chrom… in ihevcd_sao_shift_ctb()
3261 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
3268 …if(ps_sps->i2_pic_height_in_luma_samples / 2 - (ps_sao_ctxt->i4_ctb_y << (log2_ctb_size - 1)) <= … in ihevcd_sao_shift_ctb()
3358 …remaining_rows = ps_sps->i2_pic_height_in_luma_samples - ((ps_sao_ctxt->i4_ctb_y << log2_ctb_size)… in ihevcd_sao_shift_ctb()
3359 …remaining_cols = ps_sps->i2_pic_width_in_luma_samples - ((ps_sao_ctxt->i4_ctb_x << log2_ctb_size) … in ihevcd_sao_shift_ctb()
3365 pu1_src_tmp_luma -= ps_sao_ctxt->i4_ctb_x ? SAO_SHIFT_CTB : 0; in ihevcd_sao_shift_ctb()
3366 pu1_src_tmp_luma -= ps_sao_ctxt->i4_ctb_y ? SAO_SHIFT_CTB * src_strd : 0; in ihevcd_sao_shift_ctb()
3368 pu1_src_backup_luma = ps_sao_ctxt->pu1_tmp_buf_luma; in ihevcd_sao_shift_ctb()
3370 loop_filter_bit_pos = (ps_sao_ctxt->i4_ctb_x << (log2_ctb_size - 3)) + in ihevcd_sao_shift_ctb()
3371 … (ps_sao_ctxt->i4_ctb_y << (log2_ctb_size - 3)) * (loop_filter_strd << 3); in ihevcd_sao_shift_ctb()
3372 if(ps_sao_ctxt->i4_ctb_x > 0) in ihevcd_sao_shift_ctb()
3375 pu1_no_loop_filter_flag = ps_sao_ctxt->pu1_pic_no_loop_filter_flag + in ihevcd_sao_shift_ctb()
3378 for(i = -(ps_sao_ctxt->i4_ctb_y ? SAO_SHIFT_CTB : 0) >> log2_min_cu; in ihevcd_sao_shift_ctb()
3436 …remaining_rows = ps_sps->i2_pic_height_in_luma_samples - ((ps_sao_ctxt->i4_ctb_y << log2_ctb_size)… in ihevcd_sao_shift_ctb()
3437 …remaining_cols = ps_sps->i2_pic_width_in_luma_samples - ((ps_sao_ctxt->i4_ctb_x << log2_ctb_size) … in ihevcd_sao_shift_ctb()
3443 pu1_src_tmp_chroma -= ps_sao_ctxt->i4_ctb_x ? SAO_SHIFT_CTB * 2 : 0; in ihevcd_sao_shift_ctb()
3444 pu1_src_tmp_chroma -= ps_sao_ctxt->i4_ctb_y ? SAO_SHIFT_CTB * src_strd : 0; in ihevcd_sao_shift_ctb()
3446 pu1_src_backup_chroma = ps_sao_ctxt->pu1_tmp_buf_chroma; in ihevcd_sao_shift_ctb()
3448 loop_filter_bit_pos = (ps_sao_ctxt->i4_ctb_x << (log2_ctb_size - 3)) + in ihevcd_sao_shift_ctb()
3449 … (ps_sao_ctxt->i4_ctb_y << (log2_ctb_size - 3)) * (loop_filter_strd << 3); in ihevcd_sao_shift_ctb()
3450 if(ps_sao_ctxt->i4_ctb_x > 0) in ihevcd_sao_shift_ctb()
3453 pu1_no_loop_filter_flag = ps_sao_ctxt->pu1_pic_no_loop_filter_flag + in ihevcd_sao_shift_ctb()
3456 for(i = -(ps_sao_ctxt->i4_ctb_y ? 2 * SAO_SHIFT_CTB : 0) >> log2_min_cu; in ihevcd_sao_shift_ctb()