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()
114 ps_sps = ps_sao_ctxt->ps_sps; in ihevcd_sao_ctb()
117 src_strd = ps_sao_ctxt->ps_codec->i4_strd; in ihevcd_sao_ctb()
118 …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()
119 …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()
121 …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()
134 … remaining_cols = ps_sps->i2_pic_width_in_luma_samples - (ps_sao_ctxt->i4_ctb_x << log2_ctb_size); in ihevcd_sao_ctb()
138 … remaining_rows = ps_sps->i2_pic_height_in_luma_samples - (ps_sao_ctxt->i4_ctb_y << log2_ctb_size); in ihevcd_sao_ctb()
142 … 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()
143 …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()
144 … 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()
145 …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()
147 pu1_no_loop_filter_flag = ps_sao_ctxt->pu1_pic_no_loop_filter_flag + in ihevcd_sao_ctb()
148 ((ps_sao_ctxt->i4_ctb_y * ctb_size) / 8) * loop_filter_strd + in ihevcd_sao_ctb()
149 ((ps_sao_ctxt->i4_ctb_x * ctb_size) / 64); in ihevcd_sao_ctb()
173 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_ctb()
184 if(ps_sps->i2_pic_wd_in_ctb - 1 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_ctb()
195 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_ctb()
206 if(ps_sps->i2_pic_ht_in_ctb - 1 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_ctb()
225 ps_sao_ctxt->pu1_sao_src_top_left_luma_curr_ctb[0] = pu1_src_top_luma[sao_wd_luma - 1]; in ihevcd_sao_ctb()
246 … ((((ps_sao_ctxt->i4_ctb_x << log2_ctb_size) - sao_wd_luma) / 8) % 8); in ihevcd_sao_ctb()
293ps_sao_ctxt->pu1_sao_src_top_left_luma_curr_ctb, in ihevcd_sao_ctb()
307ps_sao_ctxt->pu1_sao_src_top_left_luma_curr_ctb, in ihevcd_sao_ctb()
325 … (*(UWORD32 *)(pu1_no_loop_filter_flag + i * loop_filter_strd)) >> ((((ps_sao_ctxt->i4_ctb_x << lo… in ihevcd_sao_ctb()
374ps_sao_ctxt->pu1_sao_src_top_left_chroma_curr_ctb[0] = pu1_src_top_chroma[sao_wd_chroma - 2]; in ihevcd_sao_ctb()
375ps_sao_ctxt->pu1_sao_src_top_left_chroma_curr_ctb[1] = pu1_src_top_chroma[sao_wd_chroma - 1]; in ihevcd_sao_ctb()
394 … (*(UWORD32 *)(pu1_no_loop_filter_flag + i * loop_filter_strd)) >> ((((ps_sao_ctxt->i4_ctb_x << lo… in ihevcd_sao_ctb()
441ps_sao_ctxt->pu1_sao_src_top_left_chroma_curr_ctb, in ihevcd_sao_ctb()
460ps_sao_ctxt->pu1_sao_src_top_left_chroma_curr_ctb, in ihevcd_sao_ctb()
479 … (*(UWORD32 *)(pu1_no_loop_filter_flag + i * loop_filter_strd)) >> ((((ps_sao_ctxt->i4_ctb_x << lo… in ihevcd_sao_ctb()
524 void ihevcd_sao_shift_ctb(sao_ctxt_t *ps_sao_ctxt) in ihevcd_sao_shift_ctb() argument
526 codec_t *ps_codec = ps_sao_ctxt->ps_codec; in ihevcd_sao_shift_ctb()
574 WORD32 chroma_yuv420sp_vu = ps_sao_ctxt->is_chroma_yuv420sp_vu; in ihevcd_sao_shift_ctb()
578 ps_sps = ps_sao_ctxt->ps_sps; in ihevcd_sao_shift_ctb()
579 ps_pps = ps_sao_ctxt->ps_pps; in ihevcd_sao_shift_ctb()
580 ps_tile = ps_sao_ctxt->ps_tile; in ihevcd_sao_shift_ctb()
584 src_strd = ps_sao_ctxt->ps_codec->i4_strd; in ihevcd_sao_shift_ctb()
585 ps_slice_hdr_base = ps_sao_ctxt->ps_codec->ps_slice_hdr_base; in ihevcd_sao_shift_ctb()
586 ps_slice_hdr = ps_slice_hdr_base + (ps_sao_ctxt->i4_cur_slice_idx & (MAX_SLICE_HDR_CNT - 1)); in ihevcd_sao_shift_ctb()
588 pu1_slice_idx = ps_sao_ctxt->pu1_slice_idx; in ihevcd_sao_shift_ctb()
589 pu1_tile_idx = ps_sao_ctxt->pu1_tile_idx; in ihevcd_sao_shift_ctb()
590 …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()
591 …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()
594 …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()
595 …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()
596 …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()
597 …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()
598 …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()
599 …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()
600 …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()
601 …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()
602 …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()
603 …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()
605 …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()
609 DEBUG_INIT_TMP_BUF(ps_sao_ctxt->pu1_tmp_buf_luma, ps_sao_ctxt->pu1_tmp_buf_chroma); in ihevcd_sao_shift_ctb()
628 …remaining_rows = ps_sps->i2_pic_height_in_luma_samples - ((ps_sao_ctxt->i4_ctb_y << log2_ctb_size)… in ihevcd_sao_shift_ctb()
629 …remaining_cols = ps_sps->i2_pic_width_in_luma_samples - ((ps_sao_ctxt->i4_ctb_x << log2_ctb_size) … in ihevcd_sao_shift_ctb()
635 pu1_src_tmp_luma -= ps_sao_ctxt->i4_ctb_x ? SAO_SHIFT_CTB : 0; in ihevcd_sao_shift_ctb()
636 pu1_src_tmp_luma -= ps_sao_ctxt->i4_ctb_y ? SAO_SHIFT_CTB * src_strd : 0; in ihevcd_sao_shift_ctb()
638 pu1_src_backup_luma = ps_sao_ctxt->pu1_tmp_buf_luma; in ihevcd_sao_shift_ctb()
640 loop_filter_bit_pos = (ps_sao_ctxt->i4_ctb_x << (log2_ctb_size - 3)) + in ihevcd_sao_shift_ctb()
641 … (ps_sao_ctxt->i4_ctb_y << (log2_ctb_size - 3)) * (loop_filter_strd << 3); in ihevcd_sao_shift_ctb()
642 if(ps_sao_ctxt->i4_ctb_x > 0) in ihevcd_sao_shift_ctb()
645 pu1_no_loop_filter_flag = ps_sao_ctxt->pu1_pic_no_loop_filter_flag + in ihevcd_sao_shift_ctb()
648 for(i = -(ps_sao_ctxt->i4_ctb_y ? SAO_SHIFT_CTB : 0) >> log2_min_cu; in ihevcd_sao_shift_ctb()
707 …remaining_rows = ps_sps->i2_pic_height_in_luma_samples - ((ps_sao_ctxt->i4_ctb_y << log2_ctb_size)… in ihevcd_sao_shift_ctb()
708 …remaining_cols = ps_sps->i2_pic_width_in_luma_samples - ((ps_sao_ctxt->i4_ctb_x << log2_ctb_size) … in ihevcd_sao_shift_ctb()
714 pu1_src_tmp_chroma -= ps_sao_ctxt->i4_ctb_x ? SAO_SHIFT_CTB * 2 : 0; in ihevcd_sao_shift_ctb()
715 pu1_src_tmp_chroma -= ps_sao_ctxt->i4_ctb_y ? SAO_SHIFT_CTB * src_strd : 0; in ihevcd_sao_shift_ctb()
717 pu1_src_backup_chroma = ps_sao_ctxt->pu1_tmp_buf_chroma; in ihevcd_sao_shift_ctb()
719 loop_filter_bit_pos = (ps_sao_ctxt->i4_ctb_x << (log2_ctb_size - 3)) + in ihevcd_sao_shift_ctb()
720 … (ps_sao_ctxt->i4_ctb_y << (log2_ctb_size - 3)) * (loop_filter_strd << 3); in ihevcd_sao_shift_ctb()
721 if(ps_sao_ctxt->i4_ctb_x > 0) in ihevcd_sao_shift_ctb()
724 pu1_no_loop_filter_flag = ps_sao_ctxt->pu1_pic_no_loop_filter_flag + in ihevcd_sao_shift_ctb()
727 for(i = -(ps_sao_ctxt->i4_ctb_y ? 2 * SAO_SHIFT_CTB : 0) >> log2_min_cu; in ihevcd_sao_shift_ctb()
775 DEBUG_PROCESS_TMP_BUF(ps_sao_ctxt->pu1_tmp_buf_luma, ps_sao_ctxt->pu1_tmp_buf_chroma); in ihevcd_sao_shift_ctb()
778 if(ps_sao_ctxt->i4_ctb_x > 0 && ps_sao_ctxt->i4_ctb_y > 0) in ihevcd_sao_shift_ctb()
791 WORD32 top_left_ctb_indx = (ps_sao_ctxt->i4_ctb_y - 1) * ps_sps->i2_pic_wd_in_ctb + in ihevcd_sao_shift_ctb()
792 (ps_sao_ctxt->i4_ctb_x - 1); in ihevcd_sao_shift_ctb()
800 …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()
801 …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()
802 …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()
803 …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()
878 …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()
880 ctby_tl_t = ps_sao_ctxt->i4_ctb_y - 2; in ihevcd_sao_shift_ctb()
881 ctbx_tl_l = ps_sao_ctxt->i4_ctb_x - 2; in ihevcd_sao_shift_ctb()
885 ctby_tl_t = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
886 ctbx_tl_l = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
888 ctbx_tl_t = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
889 ctby_tl_l = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
891 ctbx_tl_r = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
892 ctby_tl_r = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
894 ctbx_tl_d = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
895 ctby_tl_d = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
897 ctbx_tl = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
898 ctby_tl = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
913 if(ps_sao_ctxt->i4_ctb_x == 1) in ihevcd_sao_shift_ctb()
922 if(ps_sao_ctxt->i4_ctb_y == 1) in ihevcd_sao_shift_ctb()
942 if((0 == (ps_sao_ctxt->i4_ctb_x << log2_ctb_size) - sao_wd_luma)) in ihevcd_sao_shift_ctb()
951 if((0 == (ps_sao_ctxt->i4_ctb_y << log2_ctb_size) - sao_ht_luma)) in ihevcd_sao_shift_ctb()
997 …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()
1013 if(ps_sao_ctxt->i4_ctb_x == 1) in ihevcd_sao_shift_ctb()
1022 if(ps_sao_ctxt->i4_ctb_y == 1) in ihevcd_sao_shift_ctb()
1060 if(0 == (ps_sao_ctxt->i4_ctb_x << log2_ctb_size) - sao_wd_luma) in ihevcd_sao_shift_ctb()
1067 if(ps_sps->i2_pic_wd_in_ctb == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
1074 if((0 == (ps_sao_ctxt->i4_ctb_y << log2_ctb_size) - sao_ht_luma)) in ihevcd_sao_shift_ctb()
1080 if(ps_sps->i2_pic_ht_in_ctb == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
1199 …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()
1201 ctby_tl_t = ps_sao_ctxt->i4_ctb_y - 2; in ihevcd_sao_shift_ctb()
1202 ctbx_tl_l = ps_sao_ctxt->i4_ctb_x - 2; in ihevcd_sao_shift_ctb()
1206 ctby_tl_t = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1207 ctbx_tl_l = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
1209 ctbx_tl_t = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
1210 ctby_tl_l = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1212 ctbx_tl_r = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
1213 ctby_tl_r = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1215 ctbx_tl_d = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
1216 ctby_tl_d = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
1218 ctbx_tl = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
1219 ctby_tl = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1233 if(ps_sao_ctxt->i4_ctb_x == 1) in ihevcd_sao_shift_ctb()
1242 if(ps_sao_ctxt->i4_ctb_y == 1) in ihevcd_sao_shift_ctb()
1257 if((0 == (ps_sao_ctxt->i4_ctb_x << log2_ctb_size) - sao_wd_chroma)) in ihevcd_sao_shift_ctb()
1266 … if((0 == (ps_sao_ctxt->i4_ctb_y << (log2_ctb_size - 1)) - sao_ht_chroma)) in ihevcd_sao_shift_ctb()
1307 …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()
1323 if(ps_sao_ctxt->i4_ctb_x == 1) in ihevcd_sao_shift_ctb()
1332 if(ps_sao_ctxt->i4_ctb_y == 1) in ihevcd_sao_shift_ctb()
1368 if(0 == (ps_sao_ctxt->i4_ctb_x << log2_ctb_size) - sao_wd_chroma) in ihevcd_sao_shift_ctb()
1374 if(ps_sps->i2_pic_wd_in_ctb == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
1381 if(0 == (ps_sao_ctxt->i4_ctb_y << (log2_ctb_size - 1)) - sao_ht_chroma) in ihevcd_sao_shift_ctb()
1387 if(ps_sps->i2_pic_ht_in_ctb == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
1399 if((ctb_size == 16) && (ps_sao_ctxt->i4_ctb_y != ps_sps->i2_pic_ht_in_ctb - 1)) in ihevcd_sao_shift_ctb()
1458 if((ps_sao_ctxt->i4_ctb_y > 0)) in ihevcd_sao_shift_ctb()
1473 WORD32 top_ctb_indx = (ps_sao_ctxt->i4_ctb_y - 1) * ps_sps->i2_pic_wd_in_ctb + in ihevcd_sao_shift_ctb()
1474 (ps_sao_ctxt->i4_ctb_x); in ihevcd_sao_shift_ctb()
1478 …remaining_cols = ps_sps->i2_pic_width_in_luma_samples - ((ps_sao_ctxt->i4_ctb_x << log2_ctb_size) … in ihevcd_sao_shift_ctb()
1483 …remaining_cols = ps_sps->i2_pic_width_in_luma_samples - ((ps_sao_ctxt->i4_ctb_x << log2_ctb_size) … in ihevcd_sao_shift_ctb()
1492 … 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()
1493 …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()
1494 …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()
1495 …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()
1571 ctbx_t_t = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
1572 ctby_t_t = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1574 ctbx_t_l = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
1575 ctby_t_l = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1577 ctbx_t_r = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
1578 ctby_t_r = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1580 ctbx_t_d = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
1581 ctby_t_d = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
1583 ctbx_t = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
1584 ctby_t = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1589 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
1606 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
1659 …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()
1665 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
1706 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
1713 … 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()
1720 if(0 == (ps_sao_ctxt->i4_ctb_y << log2_ctb_size) - sao_ht_luma) in ihevcd_sao_shift_ctb()
1727 if(ps_sps->i2_pic_ht_in_ctb == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
1849 ctbx_t_t = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
1850 ctby_t_t = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1852 ctbx_t_l = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
1853 ctby_t_l = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1855 ctbx_t_r = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
1856 ctby_t_r = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1858 ctbx_t_d = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
1859 ctby_t_d = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
1861 ctbx_t = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
1862 ctby_t = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
1866 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
1884 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
1933 …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()
1939 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
1978 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
1985 …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()
1992 if(0 == (ps_sao_ctxt->i4_ctb_y << (log2_ctb_size - 1)) - sao_ht_chroma) in ihevcd_sao_shift_ctb()
1999 if(ps_sps->i2_pic_ht_in_ctb == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2066 if(ps_sao_ctxt->i4_ctb_x > 0) in ihevcd_sao_shift_ctb()
2080 WORD32 left_ctb_indx = (ps_sao_ctxt->i4_ctb_y) * ps_sps->i2_pic_wd_in_ctb + in ihevcd_sao_shift_ctb()
2081 (ps_sao_ctxt->i4_ctb_x - 1); in ihevcd_sao_shift_ctb()
2085 …remaining_rows = ps_sps->i2_pic_height_in_luma_samples - ((ps_sao_ctxt->i4_ctb_y << log2_ctb_size)… in ihevcd_sao_shift_ctb()
2090 …remaining_rows = ps_sps->i2_pic_height_in_luma_samples / 2 - ((ps_sao_ctxt->i4_ctb_y << (log2_ctb_… in ihevcd_sao_shift_ctb()
2099 …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()
2100 …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()
2101 … 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()
2102 …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()
2177 ctbx_l_t = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
2178 ctby_l_t = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
2180 ctbx_l_l = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
2181 ctby_l_l = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2183 ctbx_l_r = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
2184 ctby_l_r = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2186 ctbx_l_d = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
2187 ctby_l_d = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2189 ctbx_l = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
2190 ctby_l = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2194 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2211 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2259 …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()
2264 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2304 if(0 == (ps_sao_ctxt->i4_ctb_x << log2_ctb_size) - sao_wd_luma) in ihevcd_sao_shift_ctb()
2310 if(ps_sps->i2_pic_wd_in_ctb == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
2317 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2324 …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()
2447 ctbx_l_t = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
2448 ctby_l_t = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
2450 ctbx_l_l = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
2451 ctby_l_l = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2453 ctbx_l_r = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
2454 ctby_l_r = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2456 ctbx_l_d = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
2457 ctby_l_d = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2459 ctbx_l = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
2460 ctby_l = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2464 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2481 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2527 …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()
2532 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2571 if(0 == (ps_sao_ctxt->i4_ctb_x << log2_ctb_size) - sao_wd_chroma) in ihevcd_sao_shift_ctb()
2578 if(ps_sps->i2_pic_wd_in_ctb == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
2585 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2592 …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()
2606 … if((ctb_size == 16) && (ps_sao_ctxt->i4_ctb_x != ps_sps->i2_pic_wd_in_ctb - 1)) in ihevcd_sao_shift_ctb()
2680 …remaining_cols = ps_sps->i2_pic_width_in_luma_samples - ((ps_sao_ctxt->i4_ctb_x << log2_ctb_size) … in ihevcd_sao_shift_ctb()
2685 …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_rows = ps_sps->i2_pic_height_in_luma_samples - ((ps_sao_ctxt->i4_ctb_y << log2_ctb_size)… in ihevcd_sao_shift_ctb()
2696 …remaining_rows = ps_sps->i2_pic_height_in_luma_samples / 2 - ((ps_sao_ctxt->i4_ctb_y << (log2_ctb_… in ihevcd_sao_shift_ctb()
2702 … 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()
2703 …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()
2704 … 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()
2705 …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()
2709 if(ps_sao_ctxt->ps_slice_hdr->i1_slice_sao_luma_flag) in ihevcd_sao_shift_ctb()
2780 ctbx_c_t = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
2781 ctby_c_t = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
2783 ctbx_c_l = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
2784 ctby_c_l = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2786 ctbx_c_r = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
2787 ctby_c_r = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2789 ctbx_c_d = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
2790 ctby_c_d = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2792 ctbx_c = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
2793 ctby_c = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
2797 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
2808 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2823 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
2834 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2880 …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()
2885 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
2896 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2935 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
2942 … 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()
2949 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
2956 …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()
3000 if(ps_sao_ctxt->ps_slice_hdr->i1_slice_sao_chroma_flag) in ihevcd_sao_shift_ctb()
3084 ctbx_c_t = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
3085 ctby_c_t = ps_sao_ctxt->i4_ctb_y - 1; in ihevcd_sao_shift_ctb()
3087 ctbx_c_l = ps_sao_ctxt->i4_ctb_x - 1; in ihevcd_sao_shift_ctb()
3088 ctby_c_l = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
3090 ctbx_c_r = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
3091 ctby_c_r = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
3093 ctbx_c_d = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
3094 ctby_c_d = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
3096 ctbx_c = ps_sao_ctxt->i4_ctb_x; in ihevcd_sao_shift_ctb()
3097 ctby_c = ps_sao_ctxt->i4_ctb_y; in ihevcd_sao_shift_ctb()
3101 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
3112 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
3127 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
3139 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
3186 …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()
3191 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
3202 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
3241 if(0 == ps_sao_ctxt->i4_ctb_x) in ihevcd_sao_shift_ctb()
3248 …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()
3255 if(0 == ps_sao_ctxt->i4_ctb_y) in ihevcd_sao_shift_ctb()
3262 …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()
3352 …remaining_rows = ps_sps->i2_pic_height_in_luma_samples - ((ps_sao_ctxt->i4_ctb_y << log2_ctb_size)… in ihevcd_sao_shift_ctb()
3353 …remaining_cols = ps_sps->i2_pic_width_in_luma_samples - ((ps_sao_ctxt->i4_ctb_x << log2_ctb_size) … in ihevcd_sao_shift_ctb()
3359 pu1_src_tmp_luma -= ps_sao_ctxt->i4_ctb_x ? SAO_SHIFT_CTB : 0; in ihevcd_sao_shift_ctb()
3360 pu1_src_tmp_luma -= ps_sao_ctxt->i4_ctb_y ? SAO_SHIFT_CTB * src_strd : 0; in ihevcd_sao_shift_ctb()
3362 pu1_src_backup_luma = ps_sao_ctxt->pu1_tmp_buf_luma; in ihevcd_sao_shift_ctb()
3364 loop_filter_bit_pos = (ps_sao_ctxt->i4_ctb_x << (log2_ctb_size - 3)) + in ihevcd_sao_shift_ctb()
3365 … (ps_sao_ctxt->i4_ctb_y << (log2_ctb_size - 3)) * (loop_filter_strd << 3); in ihevcd_sao_shift_ctb()
3366 if(ps_sao_ctxt->i4_ctb_x > 0) in ihevcd_sao_shift_ctb()
3369 pu1_no_loop_filter_flag = ps_sao_ctxt->pu1_pic_no_loop_filter_flag + in ihevcd_sao_shift_ctb()
3372 for(i = -(ps_sao_ctxt->i4_ctb_y ? SAO_SHIFT_CTB : 0) >> log2_min_cu; in ihevcd_sao_shift_ctb()
3430 …remaining_rows = ps_sps->i2_pic_height_in_luma_samples - ((ps_sao_ctxt->i4_ctb_y << log2_ctb_size)… in ihevcd_sao_shift_ctb()
3431 …remaining_cols = ps_sps->i2_pic_width_in_luma_samples - ((ps_sao_ctxt->i4_ctb_x << log2_ctb_size) … in ihevcd_sao_shift_ctb()
3437 pu1_src_tmp_chroma -= ps_sao_ctxt->i4_ctb_x ? SAO_SHIFT_CTB * 2 : 0; in ihevcd_sao_shift_ctb()
3438 pu1_src_tmp_chroma -= ps_sao_ctxt->i4_ctb_y ? SAO_SHIFT_CTB * src_strd : 0; in ihevcd_sao_shift_ctb()
3440 pu1_src_backup_chroma = ps_sao_ctxt->pu1_tmp_buf_chroma; in ihevcd_sao_shift_ctb()
3442 loop_filter_bit_pos = (ps_sao_ctxt->i4_ctb_x << (log2_ctb_size - 3)) + in ihevcd_sao_shift_ctb()
3443 … (ps_sao_ctxt->i4_ctb_y << (log2_ctb_size - 3)) * (loop_filter_strd << 3); in ihevcd_sao_shift_ctb()
3444 if(ps_sao_ctxt->i4_ctb_x > 0) in ihevcd_sao_shift_ctb()
3447 pu1_no_loop_filter_flag = ps_sao_ctxt->pu1_pic_no_loop_filter_flag + in ihevcd_sao_shift_ctb()
3450 for(i = -(ps_sao_ctxt->i4_ctb_y ? 2 * SAO_SHIFT_CTB : 0) >> log2_min_cu; in ihevcd_sao_shift_ctb()