Lines Matching refs:ps_codec
114 WORD32 ihevcd_parse_transform_tree(codec_t *ps_codec, in ihevcd_parse_transform_tree() argument
129 bitstrm_t *ps_bitstrm = &ps_codec->s_parse.s_bitstrm; in ihevcd_parse_transform_tree()
133 cab_ctxt_t *ps_cabac = &ps_codec->s_parse.s_cabac; in ihevcd_parse_transform_tree()
135 max_trafo_depth = ps_codec->s_parse.s_cu.i4_max_trafo_depth; in ihevcd_parse_transform_tree()
136 ps_sps = ps_codec->s_parse.ps_sps; in ihevcd_parse_transform_tree()
137 ps_pps = ps_codec->s_parse.ps_pps; in ihevcd_parse_transform_tree()
138 intra_split_flag = ps_codec->s_parse.s_cu.i4_intra_split_flag; in ihevcd_parse_transform_tree()
161 (PRED_MODE_INTER == ps_codec->s_parse.s_cu.i4_pred_mode) && in ihevcd_parse_transform_tree()
162 (PART_2Nx2N != ps_codec->s_parse.s_cu.i4_part_mode) && in ihevcd_parse_transform_tree()
178 ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth] = 0; in ihevcd_parse_transform_tree()
179 ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth] = 0; in ihevcd_parse_transform_tree()
183 …ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth] = ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth - 1… in ihevcd_parse_transform_tree()
184 …ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth] = ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth - 1… in ihevcd_parse_transform_tree()
190 if((trafo_depth == 0) || ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth - 1]) in ihevcd_parse_transform_tree()
195 ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth] = value; in ihevcd_parse_transform_tree()
198 if((trafo_depth == 0) || ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth - 1]) in ihevcd_parse_transform_tree()
203 ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth] = value; in ihevcd_parse_transform_tree()
216 …intra_pred_mode_tmp = trafo_depth ? intra_pred_mode : ps_codec->s_parse.s_cu.ai4_intra_luma_pred_m… in ihevcd_parse_transform_tree()
217 …ihevcd_parse_transform_tree(ps_codec, x0, y0, x0, y0, log2_trafo_size - 1, trafo_depth + 1, 0, int… in ihevcd_parse_transform_tree()
219 …intra_pred_mode_tmp = trafo_depth ? intra_pred_mode : ps_codec->s_parse.s_cu.ai4_intra_luma_pred_m… in ihevcd_parse_transform_tree()
220 …ihevcd_parse_transform_tree(ps_codec, x1, y0, x0, y0, log2_trafo_size - 1, trafo_depth + 1, 1, int… in ihevcd_parse_transform_tree()
222 …intra_pred_mode_tmp = trafo_depth ? intra_pred_mode : ps_codec->s_parse.s_cu.ai4_intra_luma_pred_m… in ihevcd_parse_transform_tree()
223 …ihevcd_parse_transform_tree(ps_codec, x0, y1, x0, y0, log2_trafo_size - 1, trafo_depth + 1, 2, int… in ihevcd_parse_transform_tree()
225 …intra_pred_mode_tmp = trafo_depth ? intra_pred_mode : ps_codec->s_parse.s_cu.ai4_intra_luma_pred_m… in ihevcd_parse_transform_tree()
226 …ihevcd_parse_transform_tree(ps_codec, x1, y1, x0, y0, log2_trafo_size - 1, trafo_depth + 1, 3, int… in ihevcd_parse_transform_tree()
237 tu_t *ps_tu = ps_codec->s_parse.ps_tu; in ihevcd_parse_transform_tree()
239 ctb_x_base = ps_codec->s_parse.i4_ctb_x << ps_sps->i1_log2_ctb_size; in ihevcd_parse_transform_tree()
240 ctb_y_base = ps_codec->s_parse.i4_ctb_y << ps_sps->i1_log2_ctb_size; in ihevcd_parse_transform_tree()
242 if((ps_codec->s_parse.s_cu.i4_pred_mode == PRED_MODE_INTRA) || in ihevcd_parse_transform_tree()
244 (ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth]) || in ihevcd_parse_transform_tree()
245 (ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth])) in ihevcd_parse_transform_tree()
254 ps_codec->s_parse.s_cu.i1_cbf_luma = value; in ihevcd_parse_transform_tree()
258 ps_codec->s_parse.s_cu.i1_cbf_luma = 1; in ihevcd_parse_transform_tree()
268 ps_tu->b1_transquant_bypass = ps_codec->s_parse.s_cu.i4_cu_transquant_bypass; in ihevcd_parse_transform_tree()
270 ps_tu->b7_qp = ps_codec->s_parse.u4_qp; in ihevcd_parse_transform_tree()
273 ps_tu->b3_chroma_intra_mode_idx = ps_codec->s_parse.s_cu.i4_intra_chroma_pred_mode_idx; in ihevcd_parse_transform_tree()
276 if(ps_codec->s_parse.s_cu.i1_cbf_luma || in ihevcd_parse_transform_tree()
277 ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth] || in ihevcd_parse_transform_tree()
278 ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth]) in ihevcd_parse_transform_tree()
281 … if(ps_pps->i1_cu_qp_delta_enabled_flag && !ps_codec->s_parse.i4_is_cu_qp_delta_coded) in ihevcd_parse_transform_tree()
306 ps_codec->s_parse.i4_is_cu_qp_delta_coded = 1; in ihevcd_parse_transform_tree()
318 ps_codec->s_parse.s_cu.i4_cu_qp_delta = cu_qp_delta_abs; in ihevcd_parse_transform_tree()
322 if(ps_codec->s_parse.s_cu.i1_cbf_luma) in ihevcd_parse_transform_tree()
325 … ihevcd_parse_residual_coding(ps_codec, x0, y0, log2_trafo_size, 0, intra_pred_mode); in ihevcd_parse_transform_tree()
328 if(4 == ps_codec->s_parse.s_cu.i4_intra_chroma_pred_mode_idx) in ihevcd_parse_transform_tree()
329 intra_pred_mode_chroma = ps_codec->s_parse.s_cu.ai4_intra_luma_pred_mode[0]; in ihevcd_parse_transform_tree()
332 …intra_pred_mode_chroma = gau1_intra_pred_chroma_modes[ps_codec->s_parse.s_cu.i4_intra_chroma_pred_… in ihevcd_parse_transform_tree()
335 ps_codec->s_parse.s_cu.ai4_intra_luma_pred_mode[0]) in ihevcd_parse_transform_tree()
343 if(ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth]) in ihevcd_parse_transform_tree()
346 … ihevcd_parse_residual_coding(ps_codec, x0, y0, log2_trafo_size - 1, 1, intra_pred_mode_chroma); in ihevcd_parse_transform_tree()
349 if(ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth]) in ihevcd_parse_transform_tree()
352 … ihevcd_parse_residual_coding(ps_codec, x0, y0, log2_trafo_size - 1, 2, intra_pred_mode_chroma); in ihevcd_parse_transform_tree()
357 if(ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth]) in ihevcd_parse_transform_tree()
360 …ihevcd_parse_residual_coding(ps_codec, cu_x_base, cu_y_base, log2_trafo_size, 1, intra_pred_mode_c… in ihevcd_parse_transform_tree()
363 if(ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth]) in ihevcd_parse_transform_tree()
366 …ihevcd_parse_residual_coding(ps_codec, cu_x_base, cu_y_base, log2_trafo_size, 2, intra_pred_mode_c… in ihevcd_parse_transform_tree()
385 if((ps_codec->s_parse.s_cu.i4_pos_x << 3) == (ps_tu->b4_pos_x << 2) && in ihevcd_parse_transform_tree()
386 (ps_codec->s_parse.s_cu.i4_pos_y << 3) == (ps_tu->b4_pos_y << 2)) in ihevcd_parse_transform_tree()
395 ps_codec->s_parse.ps_tu++; in ihevcd_parse_transform_tree()
396 ps_codec->s_parse.s_cu.i4_tu_cnt++; in ihevcd_parse_transform_tree()
397 ps_codec->s_parse.i4_pic_tu_idx++; in ihevcd_parse_transform_tree()
421 IHEVCD_ERROR_T ihevcd_parse_mvd(codec_t *ps_codec, mv_t *ps_mv) in ihevcd_parse_mvd() argument
426 bitstrm_t *ps_bitstrm = &ps_codec->s_parse.s_bitstrm; in ihevcd_parse_mvd()
430 cab_ctxt_t *ps_cabac = &ps_codec->s_parse.s_cabac; in ihevcd_parse_mvd()
524 IHEVCD_ERROR_T ihevcd_parse_pcm_sample(codec_t *ps_codec, in ihevcd_parse_pcm_sample() argument
530 cab_ctxt_t *ps_cabac = &ps_codec->s_parse.s_cabac; in ihevcd_parse_pcm_sample()
538 bitstrm_t *ps_bitstrm = &ps_codec->s_parse.s_bitstrm; in ihevcd_parse_pcm_sample()
539 tu_t *ps_tu = ps_codec->s_parse.ps_tu; in ihevcd_parse_pcm_sample()
542 ps_sps = ps_codec->s_parse.ps_sps; in ihevcd_parse_pcm_sample()
552 WORD8 *pi1_buf = (WORD8 *)ps_codec->s_parse.pv_tu_coeff_data; in ihevcd_parse_pcm_sample()
567 ps_codec->s_parse.pv_tu_coeff_data = pi1_buf; in ihevcd_parse_pcm_sample()
572 ps_tu_sblk_coeff_data = (tu_sblk_coeff_data_t *)ps_codec->s_parse.pv_tu_coeff_data; in ihevcd_parse_pcm_sample()
600 ps_codec->s_parse.pv_tu_coeff_data = pu1_coeff_data; in ihevcd_parse_pcm_sample()
624 IHEVCD_ERROR_T ihevcd_parse_pu_mvp(codec_t *ps_codec, pu_t *ps_pu) in ihevcd_parse_pu_mvp() argument
629 bitstrm_t *ps_bitstrm = &ps_codec->s_parse.s_bitstrm; in ihevcd_parse_pu_mvp()
630 cab_ctxt_t *ps_cabac = &ps_codec->s_parse.s_cabac; in ihevcd_parse_pu_mvp()
633 ps_slice_hdr = ps_codec->s_parse.ps_slice_hdr; in ihevcd_parse_pu_mvp()
653 ctxt_idx = IHEVC_CAB_INTER_PRED_IDC + ps_codec->s_parse.i4_ct_depth; in ihevcd_parse_pu_mvp()
708 ihevcd_parse_mvd(ps_codec, &ps_pu->mv.s_l0_mv); in ihevcd_parse_pu_mvp()
766 ihevcd_parse_mvd(ps_codec, &ps_pu->mv.s_l1_mv); in ihevcd_parse_pu_mvp()
802 IHEVCD_ERROR_T ihevcd_parse_prediction_unit(codec_t *ps_codec, in ihevcd_parse_prediction_unit() argument
811 bitstrm_t *ps_bitstrm = &ps_codec->s_parse.s_bitstrm; in ihevcd_parse_prediction_unit()
815 pu_t *ps_pu = ps_codec->s_parse.ps_pu; in ihevcd_parse_prediction_unit()
816 cab_ctxt_t *ps_cabac = &ps_codec->s_parse.s_cabac; in ihevcd_parse_prediction_unit()
818 ps_slice_hdr = ps_codec->s_parse.ps_slice_hdr; in ihevcd_parse_prediction_unit()
823 ps_sps = ps_codec->s_parse.ps_sps; in ihevcd_parse_prediction_unit()
824 ctb_x_base = ps_codec->s_parse.i4_ctb_x << ps_sps->i1_log2_ctb_size; in ihevcd_parse_prediction_unit()
825 ctb_y_base = ps_codec->s_parse.i4_ctb_y << ps_sps->i1_log2_ctb_size; in ihevcd_parse_prediction_unit()
833 ps_pu->b3_part_mode = ps_codec->s_parse.s_cu.i4_part_mode; in ihevcd_parse_prediction_unit()
835 if(PRED_MODE_SKIP == ps_codec->s_parse.s_cu.i4_pred_mode) in ihevcd_parse_prediction_unit()
898 ihevcd_parse_pu_mvp(ps_codec, ps_pu); in ihevcd_parse_prediction_unit()
904 ps_codec->s_parse.ps_pu++; in ihevcd_parse_prediction_unit()
905 ps_codec->s_parse.i4_pic_pu_idx++; in ihevcd_parse_prediction_unit()
946 IHEVCD_ERROR_T ihevcd_parse_coding_unit_intra(codec_t *ps_codec, in ihevcd_parse_coding_unit_intra() argument
953 cab_ctxt_t *ps_cabac = &ps_codec->s_parse.s_cabac; in ihevcd_parse_coding_unit_intra()
954 bitstrm_t *ps_bitstrm = &ps_codec->s_parse.s_bitstrm; in ihevcd_parse_coding_unit_intra()
958 WORD32 part_mode = ps_codec->s_parse.s_cu.i4_part_mode; in ihevcd_parse_coding_unit_intra()
959 tu_t *ps_tu = ps_codec->s_parse.ps_tu; in ihevcd_parse_coding_unit_intra()
960 pu_t *ps_pu = ps_codec->s_parse.ps_pu; in ihevcd_parse_coding_unit_intra()
963 ps_sps = ps_codec->s_parse.ps_sps; in ihevcd_parse_coding_unit_intra()
964 ctb_x_base = ps_codec->s_parse.i4_ctb_x << ps_sps->i1_log2_ctb_size; in ihevcd_parse_coding_unit_intra()
965 ctb_y_base = ps_codec->s_parse.i4_ctb_y << ps_sps->i1_log2_ctb_size; in ihevcd_parse_coding_unit_intra()
986 ps_codec->s_parse.i4_cu_pcm_flag = pcm_flag; in ihevcd_parse_coding_unit_intra()
992 if(ps_codec->s_parse.s_bitstrm.u4_bit_ofst % 8) in ihevcd_parse_coding_unit_intra()
995 ihevcd_bits_flush_to_byte_boundary(&ps_codec->s_parse.s_bitstrm); in ihevcd_parse_coding_unit_intra()
999 ihevcd_parse_pcm_sample(ps_codec, x0, y0, log2_cb_size); in ihevcd_parse_coding_unit_intra()
1001 ihevcd_cabac_reset(&ps_codec->s_parse.s_cabac, in ihevcd_parse_coding_unit_intra()
1002 &ps_codec->s_parse.s_bitstrm); in ihevcd_parse_coding_unit_intra()
1004 ps_tu = ps_codec->s_parse.ps_tu; in ihevcd_parse_coding_unit_intra()
1012 ps_tu->b7_qp = ps_codec->s_parse.u4_qp; in ihevcd_parse_coding_unit_intra()
1018 if((ps_codec->s_parse.s_cu.i4_pos_x << 3) == (ps_tu->b4_pos_x << 2) && in ihevcd_parse_coding_unit_intra()
1019 (ps_codec->s_parse.s_cu.i4_pos_y << 3) == (ps_tu->b4_pos_y << 2)) in ihevcd_parse_coding_unit_intra()
1030 pu1_luma_intra_pred_mode_top = ps_codec->s_parse.pu1_luma_intra_pred_mode_top in ihevcd_parse_coding_unit_intra()
1031 + (ps_codec->s_parse.s_cu.i4_pos_x * 2); in ihevcd_parse_coding_unit_intra()
1033 pu1_luma_intra_pred_mode_left = ps_codec->s_parse.pu1_luma_intra_pred_mode_left in ihevcd_parse_coding_unit_intra()
1034 + (ps_codec->s_parse.s_cu.i4_pos_y * 2); in ihevcd_parse_coding_unit_intra()
1038 …ps_codec->s_func_selector.ihevc_memset_fptr(pu1_luma_intra_pred_mode_left, INTRA_DC, (cb_size / nu… in ihevcd_parse_coding_unit_intra()
1039 …ps_codec->s_func_selector.ihevc_memset_fptr(pu1_luma_intra_pred_mode_top, INTRA_DC, (cb_size / num… in ihevcd_parse_coding_unit_intra()
1049 pu1_pic_no_loop_filter_flag = ps_codec->s_parse.pu1_pic_no_loop_filter_flag; in ihevcd_parse_coding_unit_intra()
1063 ps_codec->s_parse.ps_tu++; in ihevcd_parse_coding_unit_intra()
1064 ps_codec->s_parse.s_cu.i4_tu_cnt++; in ihevcd_parse_coding_unit_intra()
1065 ps_codec->s_parse.i4_pic_tu_idx++; in ihevcd_parse_coding_unit_intra()
1083 ps_codec->s_parse.s_cu.ai4_prev_intra_luma_pred_flag[i] = in ihevcd_parse_coding_unit_intra()
1090 if(ps_codec->s_parse.s_cu.ai4_prev_intra_luma_pred_flag[cnt]) in ihevcd_parse_coding_unit_intra()
1094 ps_codec->s_parse.s_cu.ai4_mpm_idx[cnt] = value; in ihevcd_parse_coding_unit_intra()
1101 ps_codec->s_parse.s_cu.ai4_rem_intra_luma_pred_mode[cnt] = in ihevcd_parse_coding_unit_intra()
1110 ps_codec->s_parse.s_cu.i4_intra_chroma_pred_mode_idx = 4; in ihevcd_parse_coding_unit_intra()
1113 ps_codec->s_parse.s_cu.i4_intra_chroma_pred_mode_idx = in ihevcd_parse_coding_unit_intra()
1118 ps_codec->s_parse.s_cu.i4_intra_chroma_pred_mode_idx, in ihevcd_parse_coding_unit_intra()
1122 ihevcd_intra_pred_mode_prediction(ps_codec, log2_cb_size, x0, y0); in ihevcd_parse_coding_unit_intra()
1126 ps_codec->s_parse.ps_pu++; in ihevcd_parse_coding_unit_intra()
1127 ps_codec->s_parse.i4_pic_pu_idx++; in ihevcd_parse_coding_unit_intra()
1151 IHEVCD_ERROR_T ihevcd_parse_coding_unit(codec_t *ps_codec, in ihevcd_parse_coding_unit() argument
1163 UWORD32 *pu4_skip_top = ps_codec->s_parse.pu4_skip_cu_top; in ihevcd_parse_coding_unit()
1164 UWORD32 u4_skip_left = ps_codec->s_parse.u4_skip_cu_left; in ihevcd_parse_coding_unit()
1165 bitstrm_t *ps_bitstrm = &ps_codec->s_parse.s_bitstrm; in ihevcd_parse_coding_unit()
1166 tu_t *ps_tu = ps_codec->s_parse.ps_tu; in ihevcd_parse_coding_unit()
1170 cab_ctxt_t *ps_cabac = &ps_codec->s_parse.s_cabac; in ihevcd_parse_coding_unit()
1175 ps_codec->s_parse.s_cu.i4_tu_cnt = 0; in ihevcd_parse_coding_unit()
1176 ps_sps = ps_codec->s_parse.ps_sps; in ihevcd_parse_coding_unit()
1177 ps_pps = ps_codec->s_parse.ps_pps; in ihevcd_parse_coding_unit()
1179 cu_pos_x = ps_codec->s_parse.s_cu.i4_pos_x; in ihevcd_parse_coding_unit()
1180 cu_pos_y = ps_codec->s_parse.s_cu.i4_pos_y; in ihevcd_parse_coding_unit()
1184 ps_slice_hdr = ps_codec->s_parse.ps_slice_hdr; in ihevcd_parse_coding_unit()
1189 ps_codec->s_parse.s_cu.i4_cu_transquant_bypass = 0; in ihevcd_parse_coding_unit()
1194 ps_codec->s_parse.s_cu.i4_cu_transquant_bypass = in ihevcd_parse_coding_unit()
1199 AEV_TRACE("cu_transquant_bypass_flag", ps_codec->s_parse.s_cu.i4_cu_transquant_bypass, in ihevcd_parse_coding_unit()
1202 if(ps_codec->s_parse.s_cu.i4_cu_transquant_bypass) in ihevcd_parse_coding_unit()
1204 UWORD8 *pu1_pic_no_loop_filter_flag = ps_codec->s_parse.pu1_pic_no_loop_filter_flag; in ihevcd_parse_coding_unit()
1239 ((0 != ps_codec->s_parse.i4_ctb_slice_y) && in ihevcd_parse_coding_unit()
1240 (0 != ps_codec->s_parse.i4_ctb_tile_y))) in ihevcd_parse_coding_unit()
1255 … (((0 != ps_codec->s_parse.i4_ctb_slice_x) || (0 != ps_codec->s_parse.i4_ctb_slice_y)) && in ihevcd_parse_coding_unit()
1256 (0 != ps_codec->s_parse.i4_ctb_tile_x))) in ihevcd_parse_coding_unit()
1293 u4_skip_left = ps_codec->s_parse.u4_skip_cu_left; in ihevcd_parse_coding_unit()
1305 ps_codec->s_parse.u4_skip_cu_left = u4_skip_left; in ihevcd_parse_coding_unit()
1307 ps_codec->s_parse.i4_cu_pcm_flag = 0; in ihevcd_parse_coding_unit()
1314 ctb_x_base = ps_codec->s_parse.i4_ctb_x << ps_sps->i1_log2_ctb_size; in ihevcd_parse_coding_unit()
1315 ctb_y_base = ps_codec->s_parse.i4_ctb_y << ps_sps->i1_log2_ctb_size; in ihevcd_parse_coding_unit()
1324 ps_tu->b7_qp = ps_codec->s_parse.u4_qp; in ihevcd_parse_coding_unit()
1330 if((ps_codec->s_parse.s_cu.i4_pos_x << 3) == (ps_tu->b4_pos_x << 2) && in ihevcd_parse_coding_unit()
1331 (ps_codec->s_parse.s_cu.i4_pos_y << 3) == (ps_tu->b4_pos_y << 2)) in ihevcd_parse_coding_unit()
1341 ps_codec->s_parse.ps_tu++; in ihevcd_parse_coding_unit()
1342 ps_codec->s_parse.s_cu.i4_tu_cnt++; in ihevcd_parse_coding_unit()
1343 ps_codec->s_parse.i4_pic_tu_idx++; in ihevcd_parse_coding_unit()
1345 ps_codec->s_parse.s_cu.i4_pred_mode = PRED_MODE_SKIP; in ihevcd_parse_coding_unit()
1346 ps_codec->s_parse.s_cu.i4_part_mode = PART_2Nx2N; in ihevcd_parse_coding_unit()
1348 pu_t *ps_pu = ps_codec->s_parse.ps_pu; in ihevcd_parse_coding_unit()
1350 ihevcd_parse_prediction_unit(ps_codec, x0, y0, cb_size, cb_size); in ihevcd_parse_coding_unit()
1380 UWORD8 *pu1_pic_intra_flag = ps_codec->s_parse.pu1_pic_intra_flag; in ihevcd_parse_coding_unit()
1398 ps_codec->s_parse.s_cu.i4_pred_mode = pred_mode; in ihevcd_parse_coding_unit()
1457 ps_codec->s_parse.s_cu.i4_part_mode = part_mode; in ihevcd_parse_coding_unit()
1459 if((PRED_MODE_INTRA == ps_codec->s_parse.s_cu.i4_pred_mode) && in ihevcd_parse_coding_unit()
1460 (PART_NxN == ps_codec->s_parse.s_cu.i4_part_mode)) in ihevcd_parse_coding_unit()
1464 ps_codec->s_parse.s_cu.i4_part_mode = part_mode; in ihevcd_parse_coding_unit()
1465 ps_codec->s_parse.s_cu.i4_intra_split_flag = intra_split_flag; in ihevcd_parse_coding_unit()
1468 ps_codec->s_parse.i4_cu_pcm_flag = 0; in ihevcd_parse_coding_unit()
1469 ihevcd_parse_coding_unit_intra(ps_codec, x0, y0, log2_cb_size); in ihevcd_parse_coding_unit()
1470 pcm_flag = ps_codec->s_parse.i4_cu_pcm_flag; in ihevcd_parse_coding_unit()
1477 pu_t *ps_pu = ps_codec->s_parse.ps_pu; in ihevcd_parse_coding_unit()
1478 ihevcd_parse_prediction_unit(ps_codec, x0, y0, cb_size, cb_size); in ihevcd_parse_coding_unit()
1483 pu_t *ps_pu = ps_codec->s_parse.ps_pu; in ihevcd_parse_coding_unit()
1485 ihevcd_parse_prediction_unit(ps_codec, x0, y0, cb_size, cb_size / 2); in ihevcd_parse_coding_unit()
1488 ps_pu = ps_codec->s_parse.ps_pu; in ihevcd_parse_coding_unit()
1489 … ihevcd_parse_prediction_unit(ps_codec, x0, y0 + (cb_size / 2), cb_size, cb_size / 2); in ihevcd_parse_coding_unit()
1495 pu_t *ps_pu = ps_codec->s_parse.ps_pu; in ihevcd_parse_coding_unit()
1496 ihevcd_parse_prediction_unit(ps_codec, x0, y0, cb_size / 2, cb_size); in ihevcd_parse_coding_unit()
1498 ps_pu = ps_codec->s_parse.ps_pu; in ihevcd_parse_coding_unit()
1499 … ihevcd_parse_prediction_unit(ps_codec, x0 + (cb_size / 2), y0, cb_size / 2, cb_size); in ihevcd_parse_coding_unit()
1505 pu_t *ps_pu = ps_codec->s_parse.ps_pu; in ihevcd_parse_coding_unit()
1506 ihevcd_parse_prediction_unit(ps_codec, x0, y0, cb_size, cb_size / 4); in ihevcd_parse_coding_unit()
1508 ps_pu = ps_codec->s_parse.ps_pu; in ihevcd_parse_coding_unit()
1509 … ihevcd_parse_prediction_unit(ps_codec, x0, y0 + (cb_size / 4), cb_size, cb_size * 3 / 4); in ihevcd_parse_coding_unit()
1515 pu_t *ps_pu = ps_codec->s_parse.ps_pu; in ihevcd_parse_coding_unit()
1516 ihevcd_parse_prediction_unit(ps_codec, x0, y0, cb_size, cb_size * 3 / 4); in ihevcd_parse_coding_unit()
1518 ps_pu = ps_codec->s_parse.ps_pu; in ihevcd_parse_coding_unit()
1519 … ihevcd_parse_prediction_unit(ps_codec, x0, y0 + (cb_size * 3 / 4), cb_size, cb_size / 4); in ihevcd_parse_coding_unit()
1525 pu_t *ps_pu = ps_codec->s_parse.ps_pu; in ihevcd_parse_coding_unit()
1526 ihevcd_parse_prediction_unit(ps_codec, x0, y0, cb_size / 4, cb_size); in ihevcd_parse_coding_unit()
1528 ps_pu = ps_codec->s_parse.ps_pu; in ihevcd_parse_coding_unit()
1529 … ihevcd_parse_prediction_unit(ps_codec, x0 + (cb_size / 4), y0, cb_size * 3 / 4, cb_size); in ihevcd_parse_coding_unit()
1535 pu_t *ps_pu = ps_codec->s_parse.ps_pu; in ihevcd_parse_coding_unit()
1536 ihevcd_parse_prediction_unit(ps_codec, x0, y0, cb_size * 3 / 4, cb_size); in ihevcd_parse_coding_unit()
1538 ps_pu = ps_codec->s_parse.ps_pu; in ihevcd_parse_coding_unit()
1539 … ihevcd_parse_prediction_unit(ps_codec, x0 + (cb_size * 3 / 4), y0, cb_size / 4, cb_size); in ihevcd_parse_coding_unit()
1544 pu_t *ps_pu = ps_codec->s_parse.ps_pu; in ihevcd_parse_coding_unit()
1546 ihevcd_parse_prediction_unit(ps_codec, x0, y0, cb_size / 2, cb_size / 2); in ihevcd_parse_coding_unit()
1548 ps_pu = ps_codec->s_parse.ps_pu; in ihevcd_parse_coding_unit()
1549 … ihevcd_parse_prediction_unit(ps_codec, x0 + (cb_size / 2), y0, cb_size / 2, cb_size / 2); in ihevcd_parse_coding_unit()
1552 ps_pu = ps_codec->s_parse.ps_pu; in ihevcd_parse_coding_unit()
1553 … ihevcd_parse_prediction_unit(ps_codec, x0, y0 + (cb_size / 2), cb_size / 2, cb_size / 2); in ihevcd_parse_coding_unit()
1556 ps_pu = ps_codec->s_parse.ps_pu; in ihevcd_parse_coding_unit()
1557 …ihevcd_parse_prediction_unit(ps_codec, x0 + (cb_size / 2), y0 + (cb_size / 2), cb_size / 2, cb_siz… in ihevcd_parse_coding_unit()
1570 ps_pu = ps_codec->s_parse.ps_pu - 1; in ihevcd_parse_coding_unit()
1594 ps_codec->s_parse.s_cu.i4_max_trafo_depth = (pred_mode == PRED_MODE_INTRA) ? in ihevcd_parse_coding_unit()
1597 ihevcd_parse_transform_tree(ps_codec, x0, y0, x0, y0, in ihevcd_parse_coding_unit()
1599 ps_codec->s_parse.s_cu.ai4_intra_luma_pred_mode[0]); in ihevcd_parse_coding_unit()
1606 ctb_x_base = ps_codec->s_parse.i4_ctb_x << ps_sps->i1_log2_ctb_size; in ihevcd_parse_coding_unit()
1607 ctb_y_base = ps_codec->s_parse.i4_ctb_y << ps_sps->i1_log2_ctb_size; in ihevcd_parse_coding_unit()
1609 ps_tu = ps_codec->s_parse.ps_tu; in ihevcd_parse_coding_unit()
1617 ps_tu->b7_qp = ps_codec->s_parse.u4_qp; in ihevcd_parse_coding_unit()
1619 ps_tu->b6_luma_intra_mode = ps_codec->s_parse.s_cu.ai4_intra_luma_pred_mode[0]; in ihevcd_parse_coding_unit()
1623 if((ps_codec->s_parse.s_cu.i4_pos_x << 3) == (ps_tu->b4_pos_x << 2) && in ihevcd_parse_coding_unit()
1624 … (ps_codec->s_parse.s_cu.i4_pos_y << 3) == (ps_tu->b4_pos_y << 2)) in ihevcd_parse_coding_unit()
1633 ps_codec->s_parse.ps_tu++; in ihevcd_parse_coding_unit()
1634 ps_codec->s_parse.s_cu.i4_tu_cnt++; in ihevcd_parse_coding_unit()
1635 ps_codec->s_parse.i4_pic_tu_idx++; in ihevcd_parse_coding_unit()
1670 IHEVCD_ERROR_T ihevcd_parse_coding_quadtree(codec_t *ps_codec, in ihevcd_parse_coding_quadtree() argument
1683 bitstrm_t *ps_bitstrm = &ps_codec->s_parse.s_bitstrm; in ihevcd_parse_coding_quadtree()
1684 cab_ctxt_t *ps_cabac = &ps_codec->s_parse.s_cabac; in ihevcd_parse_coding_quadtree()
1686 ps_sps = ps_codec->s_parse.ps_sps; in ihevcd_parse_coding_quadtree()
1687 ps_pps = ps_codec->s_parse.ps_pps; in ihevcd_parse_coding_quadtree()
1690 cu_pos_x = (x0 - (ps_codec->s_parse.i4_ctb_x << ps_sps->i1_log2_ctb_size)) >> 3; in ihevcd_parse_coding_quadtree()
1691 cu_pos_y = (y0 - (ps_codec->s_parse.i4_ctb_y << ps_sps->i1_log2_ctb_size)) >> 3; in ihevcd_parse_coding_quadtree()
1693 ps_codec->s_parse.s_cu.i4_pos_x = cu_pos_x; in ihevcd_parse_coding_quadtree()
1694 ps_codec->s_parse.s_cu.i4_pos_y = cu_pos_y; in ihevcd_parse_coding_quadtree()
1696 ps_codec->s_parse.s_cu.i4_log2_cb_size = log2_cb_size; in ihevcd_parse_coding_quadtree()
1698 ps_codec->s_parse.i4_ct_depth = ct_depth; in ihevcd_parse_coding_quadtree()
1700 UWORD32 *pu4_ct_depth_top = ps_codec->s_parse.pu4_ct_depth_top; in ihevcd_parse_coding_quadtree()
1701 UWORD32 u4_ct_depth_left = ps_codec->s_parse.u4_ct_depth_left; in ihevcd_parse_coding_quadtree()
1725 ((0 != ps_codec->s_parse.i4_ctb_slice_y) && in ihevcd_parse_coding_quadtree()
1726 (0 != ps_codec->s_parse.i4_ctb_tile_y))) in ihevcd_parse_coding_quadtree()
1744 … (((0 != ps_codec->s_parse.i4_ctb_slice_x) || (0 != ps_codec->s_parse.i4_ctb_slice_y)) && in ihevcd_parse_coding_quadtree()
1745 (0 != ps_codec->s_parse.i4_ctb_tile_x))) in ihevcd_parse_coding_quadtree()
1788 u4_ct_depth_left = ps_codec->s_parse.u4_ct_depth_left; in ihevcd_parse_coding_quadtree()
1801 ps_codec->s_parse.u4_ct_depth_left = u4_ct_depth_left; in ihevcd_parse_coding_quadtree()
1807 ps_codec->s_parse.i4_is_cu_qp_delta_coded = 0; in ihevcd_parse_coding_quadtree()
1808 ps_codec->s_parse.i4_cu_qp_delta = 0; in ihevcd_parse_coding_quadtree()
1815 ihevcd_parse_coding_quadtree(ps_codec, x0, y0, log2_cb_size - 1, ct_depth + 1); in ihevcd_parse_coding_quadtree()
1819 ihevcd_parse_coding_quadtree(ps_codec, x1, y0, log2_cb_size - 1, ct_depth + 1); in ihevcd_parse_coding_quadtree()
1822 ihevcd_parse_coding_quadtree(ps_codec, x0, y1, log2_cb_size - 1, ct_depth + 1); in ihevcd_parse_coding_quadtree()
1826 ihevcd_parse_coding_quadtree(ps_codec, x1, y1, log2_cb_size - 1, ct_depth + 1); in ihevcd_parse_coding_quadtree()
1832 WORD32 cu_pos_x = ps_codec->s_parse.s_cu.i4_pos_x << 3; in ihevcd_parse_coding_quadtree()
1833 WORD32 cu_pos_y = ps_codec->s_parse.s_cu.i4_pos_y << 3; in ihevcd_parse_coding_quadtree()
1841 ps_codec->s_parse.u4_qpg = ps_codec->s_parse.u4_qp; in ihevcd_parse_coding_quadtree()
1843 ps_codec->s_parse.s_cu.i4_cu_qp_delta = 0; in ihevcd_parse_coding_quadtree()
1848 ihevcd_parse_coding_unit(ps_codec, x0, y0, log2_cb_size); in ihevcd_parse_coding_quadtree()
1860 tu_t *ps_tu = ps_codec->s_parse.ps_tu; in ihevcd_parse_coding_quadtree()
1861 WORD32 cb_size = 1 << ps_codec->s_parse.s_cu.i4_log2_cb_size; in ihevcd_parse_coding_quadtree()
1863 cu_pos_x = ps_codec->s_parse.s_cu.i4_pos_x << 3; in ihevcd_parse_coding_quadtree()
1864 cu_pos_y = ps_codec->s_parse.s_cu.i4_pos_y << 3; in ihevcd_parse_coding_quadtree()
1870 qp_left = ps_codec->s_parse.u4_qpg; in ihevcd_parse_coding_quadtree()
1871 qp_top = ps_codec->s_parse.u4_qpg; in ihevcd_parse_coding_quadtree()
1875 qp_left = ps_codec->s_parse.ai1_8x8_cu_qp[qpg_x - 1 + (qpg_y * 8)]; in ihevcd_parse_coding_quadtree()
1879 qp_top = ps_codec->s_parse.ai1_8x8_cu_qp[qpg_x + ((qpg_y - 1) * 8)]; in ihevcd_parse_coding_quadtree()
1885 qp = (qp_pred + ps_codec->s_parse.s_cu.i4_cu_qp_delta + 52) % 52; in ihevcd_parse_coding_quadtree()
1892 ps_codec->s_parse.ai1_8x8_cu_qp[cur_cu_offset + (i * 8) + j] = qp; in ihevcd_parse_coding_quadtree()
1896 ps_codec->s_parse.u4_qp = qp; in ihevcd_parse_coding_quadtree()
1897 ps_codec->s_parse.s_cu.i4_qp = qp; in ihevcd_parse_coding_quadtree()
1903 ps_tu_tmp = ps_tu - ps_codec->s_parse.s_cu.i4_tu_cnt; in ihevcd_parse_coding_quadtree()
1904 ps_tu->b7_qp = ps_codec->s_parse.u4_qp; in ihevcd_parse_coding_quadtree()
1907 ps_tu_tmp->b7_qp = ps_codec->s_parse.u4_qp; in ihevcd_parse_coding_quadtree()
1912 if(ps_codec->s_parse.s_cu.i4_cu_qp_delta) in ihevcd_parse_coding_quadtree()
1915 … ctb_indx = ps_codec->s_parse.i4_ctb_x + ps_sps->i2_pic_wd_in_ctb * ps_codec->s_parse.i4_ctb_y; in ihevcd_parse_coding_quadtree()
1916 … ps_codec->s_parse.s_bs_ctxt.pu1_pic_qp_const_in_ctb[ctb_indx >> 3] &= (~(1 << (ctb_indx & 7))); in ihevcd_parse_coding_quadtree()
1949 IHEVCD_ERROR_T ihevcd_parse_sao(codec_t *ps_codec) in ihevcd_parse_sao() argument
1957 bitstrm_t *ps_bitstrm = &ps_codec->s_parse.s_bitstrm; in ihevcd_parse_sao()
1961 cab_ctxt_t *ps_cabac = &ps_codec->s_parse.s_cabac; in ihevcd_parse_sao()
1964 ps_slice_hdr = ps_codec->s_parse.ps_slice_hdr_base; in ihevcd_parse_sao()
1965 ps_slice_hdr += (ps_codec->s_parse.i4_cur_slice_idx & (MAX_SLICE_HDR_CNT - 1)); in ihevcd_parse_sao()
1967 ps_sps = (ps_codec->s_parse.ps_sps); in ihevcd_parse_sao()
1968 rx = ps_codec->s_parse.i4_ctb_x; in ihevcd_parse_sao()
1969 ry = ps_codec->s_parse.i4_ctb_y; in ihevcd_parse_sao()
1971 ps_sao = ps_codec->s_parse.ps_pic_sao + rx + ry * ps_sps->i2_pic_wd_in_ctb; in ihevcd_parse_sao()
1985 if(((0 != ps_codec->s_parse.i4_ctb_slice_x) || (0 != ps_codec->s_parse.i4_ctb_slice_y)) && in ihevcd_parse_sao()
1986 (0 != ps_codec->s_parse.i4_ctb_tile_x)) in ihevcd_parse_sao()
1999 if((ps_codec->s_parse.i4_ctb_slice_y > 0) && (ps_codec->s_parse.i4_ctb_tile_y > 0)) in ihevcd_parse_sao()
2170 IHEVCD_ERROR_T ihevcd_parse_slice_data(codec_t *ps_codec) in ihevcd_parse_slice_data() argument
2192 ps_slice_hdr = ps_codec->s_parse.ps_slice_hdr_base; in ihevcd_parse_slice_data()
2193 ps_pps = ps_codec->s_parse.ps_pps_base; in ihevcd_parse_slice_data()
2194 ps_sps = ps_codec->s_parse.ps_sps_base; in ihevcd_parse_slice_data()
2197 ps_slice_hdr += (ps_codec->s_parse.i4_cur_slice_idx & (MAX_SLICE_HDR_CNT - 1)); in ihevcd_parse_slice_data()
2201 if(0 != ps_codec->s_parse.i4_cur_slice_idx) in ihevcd_parse_slice_data()
2205 ps_codec->s_parse.i4_cur_independent_slice_idx = in ihevcd_parse_slice_data()
2206 ps_codec->s_parse.i4_cur_slice_idx & (MAX_SLICE_HDR_CNT - 1); in ihevcd_parse_slice_data()
2216 if(0 == ps_codec->i4_slice_error) in ihevcd_parse_slice_data()
2218 ps_codec->s_parse.i4_ctb_x = ps_slice_hdr->i2_ctb_x; in ihevcd_parse_slice_data()
2219 ps_codec->s_parse.i4_ctb_y = ps_slice_hdr->i2_ctb_y; in ihevcd_parse_slice_data()
2221 ps_codec->s_parse.ps_pps = ps_pps; in ihevcd_parse_slice_data()
2222 ps_codec->s_parse.ps_sps = ps_sps; in ihevcd_parse_slice_data()
2223 ps_codec->s_parse.ps_slice_hdr = ps_slice_hdr; in ihevcd_parse_slice_data()
2227 ihevcd_get_tile_pos(ps_pps, ps_sps, ps_codec->s_parse.i4_ctb_x, in ihevcd_parse_slice_data()
2228 ps_codec->s_parse.i4_ctb_y, in ihevcd_parse_slice_data()
2229 &ps_codec->s_parse.i4_ctb_tile_x, in ihevcd_parse_slice_data()
2230 &ps_codec->s_parse.i4_ctb_tile_y, in ihevcd_parse_slice_data()
2232 ps_codec->s_parse.ps_tile = ps_pps->ps_tile + tile_idx; in ihevcd_parse_slice_data()
2233 ps_codec->s_parse.i4_cur_tile_idx = tile_idx; in ihevcd_parse_slice_data()
2234 ps_tile = ps_codec->s_parse.ps_tile; in ihevcd_parse_slice_data()
2242 if(0 == ps_codec->i4_slice_error) in ihevcd_parse_slice_data()
2247 if((0 == ps_codec->s_parse.i4_ctb_tile_x) && (0 == ps_codec->s_parse.i4_ctb_tile_y)) in ihevcd_parse_slice_data()
2249 ps_codec->s_parse.i4_ctb_slice_x = 0; in ihevcd_parse_slice_data()
2250 ps_codec->s_parse.i4_ctb_slice_y = 0; in ihevcd_parse_slice_data()
2256 ps_codec->s_parse.i4_ctb_slice_x = 0; in ihevcd_parse_slice_data()
2257 ps_codec->s_parse.i4_ctb_slice_y = 0; in ihevcd_parse_slice_data()
2262 if((0 == ps_codec->s_parse.i4_ctb_y) && in ihevcd_parse_slice_data()
2263 (0 == ps_codec->s_parse.i4_ctb_x)) in ihevcd_parse_slice_data()
2265 ret = ihevcd_parse_pic_init(ps_codec); in ihevcd_parse_slice_data()
2268 ps_codec->s_parse.pu4_pic_tu_idx[0] = 0; in ihevcd_parse_slice_data()
2269 ps_codec->s_parse.pu4_pic_pu_idx[0] = 0; in ihevcd_parse_slice_data()
2270 ps_codec->s_parse.i4_cur_independent_slice_idx = 0; in ihevcd_parse_slice_data()
2271 ps_codec->s_parse.i4_ctb_tile_x = 0; in ihevcd_parse_slice_data()
2272 ps_codec->s_parse.i4_ctb_tile_y = 0; in ihevcd_parse_slice_data()
2277 mv_buf_t *ps_mv_buf = ps_codec->s_parse.ps_cur_mv_buf; in ihevcd_parse_slice_data()
2283 …ps_mv_buf->ai4_l1_collocated_poc[(ps_codec->s_parse.i4_cur_slice_idx & (MAX_SLICE_HDR_CNT - 1))][i… in ihevcd_parse_slice_data()
2284 …ps_mv_buf->ai1_l1_collocated_poc_lt[(ps_codec->s_parse.i4_cur_slice_idx & (MAX_SLICE_HDR_CNT - 1))… in ihevcd_parse_slice_data()
2292 …ps_mv_buf->ai4_l0_collocated_poc[(ps_codec->s_parse.i4_cur_slice_idx & (MAX_SLICE_HDR_CNT - 1))][i… in ihevcd_parse_slice_data()
2293 …ps_mv_buf->ai1_l0_collocated_poc_lt[(ps_codec->s_parse.i4_cur_slice_idx & (MAX_SLICE_HDR_CNT - 1))… in ihevcd_parse_slice_data()
2299 if((0 == ps_codec->s_parse.i4_ctb_slice_x) || (0 == ps_codec->s_parse.i4_ctb_slice_y)) in ihevcd_parse_slice_data()
2347 …= ps_slice_hdr->i1_dependent_slice_flag) && ((0 == ps_codec->s_parse.i4_ctb_tile_x) && (0 == ps_co… in ihevcd_parse_slice_data()
2349 ps_codec->s_parse.u4_qp = slice_qp; in ihevcd_parse_slice_data()
2354 …1 == ps_slice_hdr->i1_dependent_slice_flag) && (!((ps_codec->s_parse.i4_ctb_tile_x == 0) && (ps_co… in ihevcd_parse_slice_data()
2356 …_enabled_flag) || (ps_pps->i1_entropy_coding_sync_enabled_flag && (0 != ps_codec->s_parse.i4_ctb_x… in ihevcd_parse_slice_data()
2358 ihevcd_cabac_reset(&ps_codec->s_parse.s_cabac, in ihevcd_parse_slice_data()
2359 &ps_codec->s_parse.s_bitstrm); in ihevcd_parse_slice_data()
2362 …_enabled_flag) || (ps_pps->i1_entropy_coding_sync_enabled_flag && (0 != ps_codec->s_parse.i4_ctb_x… in ihevcd_parse_slice_data()
2364 ihevcd_cabac_init(&ps_codec->s_parse.s_cabac, in ihevcd_parse_slice_data()
2365 &ps_codec->s_parse.s_bitstrm, in ihevcd_parse_slice_data()
2376 WORD32 cur_ctb_idx = ps_codec->s_parse.i4_ctb_x in ihevcd_parse_slice_data()
2377 + ps_codec->s_parse.i4_ctb_y * (ps_sps->i2_pic_wd_in_ctb); in ihevcd_parse_slice_data()
2378 if(1 == ps_codec->i4_num_cores && 0 == cur_ctb_idx % RESET_TU_BUF_NCTB) in ihevcd_parse_slice_data()
2380 ps_codec->s_parse.ps_tu = ps_codec->s_parse.ps_pic_tu; in ihevcd_parse_slice_data()
2381 ps_codec->s_parse.i4_pic_tu_idx = 0; in ihevcd_parse_slice_data()
2391 ps_codec->s_parse.i4_ctb_num_pcm_blks = 0; in ihevcd_parse_slice_data()
2396 if(((0 == ps_codec->s_parse.i4_ctb_tile_x) && (0 == ps_codec->s_parse.i4_ctb_tile_y)) in ihevcd_parse_slice_data()
2398 … && (!((0 == ps_codec->s_parse.i4_ctb_slice_x) && (0 == ps_codec->s_parse.i4_ctb_slice_y)))) in ihevcd_parse_slice_data()
2402 ps_codec->s_parse.u4_qp = slice_qp; in ihevcd_parse_slice_data()
2404 ihevcd_get_tile_pos(ps_pps, ps_sps, ps_codec->s_parse.i4_ctb_x, in ihevcd_parse_slice_data()
2405 ps_codec->s_parse.i4_ctb_y, in ihevcd_parse_slice_data()
2406 &ps_codec->s_parse.i4_ctb_tile_x, in ihevcd_parse_slice_data()
2407 &ps_codec->s_parse.i4_ctb_tile_y, in ihevcd_parse_slice_data()
2410 ps_codec->s_parse.ps_tile = ps_pps->ps_tile + tile_idx; in ihevcd_parse_slice_data()
2411 ps_codec->s_parse.i4_cur_tile_idx = tile_idx; in ihevcd_parse_slice_data()
2426 ps_codec->s_parse.i4_ctb_slice_y = ps_tile->u1_pos_y - ps_slice_hdr->i2_ctb_y; in ihevcd_parse_slice_data()
2434 ps_codec->s_parse.i4_ctb_slice_y -= 1; in ihevcd_parse_slice_data()
2452 ihevcd_cabac_init(&ps_codec->s_parse.s_cabac, in ihevcd_parse_slice_data()
2453 &ps_codec->s_parse.s_bitstrm, in ihevcd_parse_slice_data()
2464 if(0 == ps_codec->s_parse.i4_ctb_tile_x) in ihevcd_parse_slice_data()
2467 if(1 < ps_codec->i4_num_cores) in ihevcd_parse_slice_data()
2473 s_job.i2_ctb_x = (WORD16)ps_codec->s_parse.i4_ctb_x; in ihevcd_parse_slice_data()
2474 s_job.i2_ctb_y = (WORD16)ps_codec->s_parse.i4_ctb_y; in ihevcd_parse_slice_data()
2475 s_job.i2_slice_idx = (WORD16)ps_codec->s_parse.i4_cur_slice_idx; in ihevcd_parse_slice_data()
2476 s_job.i4_tu_coeff_data_ofst = (UWORD8 *)ps_codec->s_parse.pv_tu_coeff_data - in ihevcd_parse_slice_data()
2477 (UWORD8 *)ps_codec->s_parse.pv_pic_tu_coeff_data; in ihevcd_parse_slice_data()
2478 … ret = ihevcd_jobq_queue((jobq_t *)ps_codec->s_parse.pv_proc_jobq, &s_job, sizeof(proc_job_t), 1); in ihevcd_parse_slice_data()
2485 process_ctxt_t *ps_proc = &ps_codec->as_process[0]; in ihevcd_parse_slice_data()
2486 WORD32 tu_coeff_data_ofst = (UWORD8 *)ps_codec->s_parse.pv_tu_coeff_data - in ihevcd_parse_slice_data()
2487 (UWORD8 *)ps_codec->s_parse.pv_pic_tu_coeff_data; in ihevcd_parse_slice_data()
2495 ps_proc->i4_ctb_x = ps_codec->s_parse.i4_ctb_x; in ihevcd_parse_slice_data()
2496 ps_proc->i4_ctb_y = ps_codec->s_parse.i4_ctb_y; in ihevcd_parse_slice_data()
2497 ps_proc->i4_cur_slice_idx = ps_codec->s_parse.i4_cur_slice_idx; in ihevcd_parse_slice_data()
2508 if(0 == ps_codec->s_parse.i4_ctb_x) in ihevcd_parse_slice_data()
2513 … if((0 == ps_codec->s_parse.i4_ctb_slice_y) && (!ps_slice_hdr->i1_dependent_slice_flag)) in ihevcd_parse_slice_data()
2518 ps_codec->s_parse.u4_qp = slice_qp; in ihevcd_parse_slice_data()
2522 ihevcd_cabac_init(&ps_codec->s_parse.s_cabac, in ihevcd_parse_slice_data()
2523 &ps_codec->s_parse.s_bitstrm, in ihevcd_parse_slice_data()
2532 ihevcd_cabac_init(&ps_codec->s_parse.s_cabac, in ihevcd_parse_slice_data()
2533 &ps_codec->s_parse.s_bitstrm, in ihevcd_parse_slice_data()
2536 … (const UWORD8 *)&ps_codec->s_parse.s_cabac.au1_ctxt_models_sync); in ihevcd_parse_slice_data()
2544 if(0 == ps_codec->i4_slice_error) in ihevcd_parse_slice_data()
2547 ihevcd_parse_sao(ps_codec); in ihevcd_parse_slice_data()
2551 sao_t *ps_sao = ps_codec->s_parse.ps_pic_sao + in ihevcd_parse_slice_data()
2552 ps_codec->s_parse.i4_ctb_x + in ihevcd_parse_slice_data()
2553 ps_codec->s_parse.i4_ctb_y * ps_sps->i2_pic_wd_in_ctb; in ihevcd_parse_slice_data()
2566 … ctb_indx = ps_codec->s_parse.i4_ctb_x + ps_sps->i2_pic_wd_in_ctb * ps_codec->s_parse.i4_ctb_y; in ihevcd_parse_slice_data()
2567 … ps_codec->s_parse.s_bs_ctxt.pu1_pic_qp_const_in_ctb[ctb_indx >> 3] |= (1 << (ctb_indx & 7)); in ihevcd_parse_slice_data()
2569 UWORD16 *pu1_slice_idx = ps_codec->s_parse.pu1_slice_idx; in ihevcd_parse_slice_data()
2570 pu1_slice_idx[ctb_indx] = ps_codec->s_parse.i4_cur_independent_slice_idx; in ihevcd_parse_slice_data()
2574 if(0 == ps_codec->i4_slice_error) in ihevcd_parse_slice_data()
2576 ihevcd_parse_coding_quadtree(ps_codec, in ihevcd_parse_slice_data()
2577 (ps_codec->s_parse.i4_ctb_x << ps_sps->i1_log2_ctb_size), in ihevcd_parse_slice_data()
2578 (ps_codec->s_parse.i4_ctb_y << ps_sps->i1_log2_ctb_size), in ihevcd_parse_slice_data()
2584 tu_t *ps_tu = ps_codec->s_parse.ps_tu; in ihevcd_parse_slice_data()
2585 pu_t *ps_pu = ps_codec->s_parse.ps_pu; in ihevcd_parse_slice_data()
2594 ps_tu->b7_qp = ps_codec->s_parse.u4_qp; in ihevcd_parse_slice_data()
2599 ps_codec->s_parse.ps_tu++; in ihevcd_parse_slice_data()
2600 ps_codec->s_parse.s_cu.i4_tu_cnt++; in ihevcd_parse_slice_data()
2601 ps_codec->s_parse.i4_pic_tu_idx++; in ihevcd_parse_slice_data()
2603 ps_codec->s_parse.s_cu.i4_pred_mode = PRED_MODE_SKIP; in ihevcd_parse_slice_data()
2604 ps_codec->s_parse.s_cu.i4_part_mode = PART_2Nx2N; in ihevcd_parse_slice_data()
2612 ps_pu->b3_part_mode = ps_codec->s_parse.s_cu.i4_part_mode; in ihevcd_parse_slice_data()
2616 ps_codec->s_parse.ps_pu++; in ihevcd_parse_slice_data()
2617 ps_codec->s_parse.i4_pic_pu_idx++; in ihevcd_parse_slice_data()
2621 if(0 == ps_codec->i4_slice_error) in ihevcd_parse_slice_data()
2622 …end_of_slice_flag = ihevcd_cabac_decode_terminate(&ps_codec->s_parse.s_cabac, &ps_codec->s_parse.s… in ihevcd_parse_slice_data()
2626 AEV_TRACE("end_of_slice_flag", end_of_slice_flag, ps_codec->s_parse.s_cabac.u4_range); in ihevcd_parse_slice_data()
2638 if(1 == ps_codec->s_parse.i4_ctb_x) in ihevcd_parse_slice_data()
2640 WORD32 size = sizeof(ps_codec->s_parse.s_cabac.au1_ctxt_models); in ihevcd_parse_slice_data()
2641 …memcpy(&ps_codec->s_parse.s_cabac.au1_ctxt_models_sync, &ps_codec->s_parse.s_cabac.au1_ctxt_models… in ihevcd_parse_slice_data()
2646 if((ps_codec->s_parse.i4_ctb_tile_x + 1) == (ps_tile->u2_wd)) in ihevcd_parse_slice_data()
2649 if((ps_codec->s_parse.i4_ctb_tile_y + 1) == ps_tile->u2_ht) in ihevcd_parse_slice_data()
2657 …nd_of_sub_stream_one_bit = ihevcd_cabac_decode_terminate(&ps_codec->s_parse.s_cabac, &ps_codec->s_… in ihevcd_parse_slice_data()
2658 …AEV_TRACE("end_of_sub_stream_one_bit", end_of_sub_stream_one_bit, ps_codec->s_parse.s_cabac.u4_ran… in ihevcd_parse_slice_data()
2662 if(ps_codec->s_parse.s_bitstrm.u4_bit_ofst % 8) in ihevcd_parse_slice_data()
2663 ihevcd_bits_flush_to_byte_boundary(&ps_codec->s_parse.s_bitstrm); in ihevcd_parse_slice_data()
2671 ctb_addr = ps_codec->s_parse.i4_ctb_y * num_ctb_in_row + ps_codec->s_parse.i4_ctb_x; in ihevcd_parse_slice_data()
2678 …if((ps_tile->u2_wd == (ps_codec->s_parse.i4_ctb_tile_x + 1)) && (ps_tile->u2_wd != ps_sps->i2_pic_… in ihevcd_parse_slice_data()
2680 …ctb_indx = (ps_sps->i2_pic_wd_in_ctb * (ps_codec->s_parse.i4_ctb_tile_y + 1 + ps_tile->u1_pos_y)) … in ihevcd_parse_slice_data()
2681 if(ps_tile->u2_ht == (ps_codec->s_parse.i4_ctb_tile_y + 1)) in ihevcd_parse_slice_data()
2690 tile_t *ps_next_tile = ps_codec->s_parse.ps_tile + 1; in ihevcd_parse_slice_data()
2696 ps_codec->s_parse.pu4_pic_pu_idx[ctb_indx] = ps_codec->s_parse.i4_pic_pu_idx; in ihevcd_parse_slice_data()
2697 ps_codec->s_parse.i4_next_pu_ctb_cnt = ctb_indx; in ihevcd_parse_slice_data()
2699 ps_codec->s_parse.pu1_pu_map += num_min4x4_in_ctb; in ihevcd_parse_slice_data()
2702 if(1 == ps_codec->i4_num_cores) in ihevcd_parse_slice_data()
2708 …if((ps_tile->u2_wd == (ps_codec->s_parse.i4_ctb_tile_x + 1)) && (ps_tile->u2_wd != ps_sps->i2_pic_… in ihevcd_parse_slice_data()
2710 …ctb_indx = (ps_sps->i2_pic_wd_in_ctb * (ps_codec->s_parse.i4_ctb_tile_y + 1 + ps_tile->u1_pos_y)) … in ihevcd_parse_slice_data()
2711 if(ps_tile->u2_ht == (ps_codec->s_parse.i4_ctb_tile_y + 1)) in ihevcd_parse_slice_data()
2721 tile_t *ps_next_tile = ps_codec->s_parse.ps_tile + 1; in ihevcd_parse_slice_data()
2726 ps_codec->s_parse.i4_next_tu_ctb_cnt = ctb_indx; in ihevcd_parse_slice_data()
2727 ps_codec->s_parse.pu4_pic_tu_idx[ctb_indx] = ps_codec->s_parse.i4_pic_tu_idx; in ihevcd_parse_slice_data()
2732 …if((ps_tile->u2_wd == (ps_codec->s_parse.i4_ctb_tile_x + 1)) && (ps_tile->u2_wd != ps_sps->i2_pic_… in ihevcd_parse_slice_data()
2734 …ctb_indx = (ps_sps->i2_pic_wd_in_ctb * (ps_codec->s_parse.i4_ctb_tile_y + 1 + ps_tile->u1_pos_y)) … in ihevcd_parse_slice_data()
2735 if(ps_tile->u2_ht == (ps_codec->s_parse.i4_ctb_tile_y + 1)) in ihevcd_parse_slice_data()
2744 tile_t *ps_next_tile = ps_codec->s_parse.ps_tile + 1; in ihevcd_parse_slice_data()
2749 ps_codec->s_parse.i4_next_tu_ctb_cnt = ctb_indx; in ihevcd_parse_slice_data()
2750 ps_codec->s_parse.pu4_pic_tu_idx[ctb_indx] = ps_codec->s_parse.i4_pic_tu_idx; in ihevcd_parse_slice_data()
2752 ps_codec->s_parse.pu1_tu_map += num_min4x4_in_ctb; in ihevcd_parse_slice_data()
2757 if((0 != ps_codec->i4_disable_deblk_pic) && in ihevcd_parse_slice_data()
2760 bs_ctxt_t *ps_bs_ctxt = &ps_codec->s_parse.s_bs_ctxt; in ihevcd_parse_slice_data()
2771 … cur_ctb_idx = ps_codec->s_parse.i4_ctb_x + ps_sps->i2_pic_wd_in_ctb * ps_codec->s_parse.i4_ctb_y; in ihevcd_parse_slice_data()
2774 …pu1_qp = ps_bs_ctxt->pu1_pic_qp + ((ps_codec->s_parse.i4_ctb_x + ps_codec->s_parse.i4_ctb_y * qp_s… in ihevcd_parse_slice_data()
2778 next_ctb_idx = ps_codec->s_parse.i4_next_tu_ctb_cnt; in ihevcd_parse_slice_data()
2779 if(1 == ps_codec->i4_num_cores) in ihevcd_parse_slice_data()
2781 i4_ctb_tu_cnt = ps_codec->s_parse.pu4_pic_tu_idx[next_ctb_idx] - in ihevcd_parse_slice_data()
2782 ps_codec->s_parse.pu4_pic_tu_idx[cur_ctb_idx % RESET_TU_BUF_NCTB]; in ihevcd_parse_slice_data()
2784 cur_tu_idx = ps_codec->s_parse.pu4_pic_tu_idx[cur_ctb_idx % RESET_TU_BUF_NCTB]; in ihevcd_parse_slice_data()
2788 i4_ctb_tu_cnt = ps_codec->s_parse.pu4_pic_tu_idx[next_ctb_idx] - in ihevcd_parse_slice_data()
2789 ps_codec->s_parse.pu4_pic_tu_idx[cur_ctb_idx]; in ihevcd_parse_slice_data()
2791 cur_tu_idx = ps_codec->s_parse.pu4_pic_tu_idx[cur_ctb_idx]; in ihevcd_parse_slice_data()
2794 ps_tu = &ps_codec->s_parse.ps_pic_tu[cur_tu_idx]; in ihevcd_parse_slice_data()
2830 if(ps_codec->i4_num_cores <= MV_PRED_NUM_CORES_THRESHOLD) in ihevcd_parse_slice_data()
2857 if((0 == ps_codec->s_parse.i4_ctb_y) || (0 == ps_codec->s_parse.i4_ctb_tile_y)) in ihevcd_parse_slice_data()
2864 if((0 == ps_codec->s_parse.i4_ctb_x) || (0 == ps_codec->s_parse.i4_ctb_tile_x)) in ihevcd_parse_slice_data()
2868 … if((0 == ps_codec->s_parse.i4_ctb_slice_y) || (0 == ps_codec->s_parse.i4_ctb_tile_y)) in ihevcd_parse_slice_data()
2871 … if((i2_wd_in_ctb - 1) != ps_codec->s_parse.i4_ctb_slice_x) //TODO: For tile, not implemented in ihevcd_parse_slice_data()
2878 else if(ps_codec->s_parse.i4_ctb_x > 0) in ihevcd_parse_slice_data()
2880 … if((0 == ps_codec->s_parse.i4_ctb_slice_y) || (0 == ps_codec->s_parse.i4_ctb_tile_y)) in ihevcd_parse_slice_data()
2884 if(0 == ps_codec->s_parse.i4_ctb_slice_x) in ihevcd_parse_slice_data()
2888 if((i2_wd_in_ctb - 1) != ps_codec->s_parse.i4_ctb_slice_x) in ihevcd_parse_slice_data()
2893 … else if((1 == ps_codec->s_parse.i4_ctb_slice_y) && (0 == ps_codec->s_parse.i4_ctb_slice_x)) in ihevcd_parse_slice_data()
2899 …if(((ps_sps->i2_pic_wd_in_ctb - 1) == ps_codec->s_parse.i4_ctb_x) || ((ps_tile->u2_wd - 1) == ps_c… in ihevcd_parse_slice_data()
2916 … ps_proc = &ps_codec->as_process[(ps_codec->i4_num_cores == 1) ? 1 : (ps_codec->i4_num_cores - 1)]; in ihevcd_parse_slice_data()
2917 cur_ctb_idx = ps_codec->s_parse.i4_ctb_x in ihevcd_parse_slice_data()
2918 + ps_codec->s_parse.i4_ctb_y * (ps_sps->i2_pic_wd_in_ctb); in ihevcd_parse_slice_data()
2919 next_ctb_idx = ps_codec->s_parse.i4_next_pu_ctb_cnt; in ihevcd_parse_slice_data()
2920 i4_ctb_pu_cnt = ps_codec->s_parse.pu4_pic_pu_idx[next_ctb_idx] in ihevcd_parse_slice_data()
2921 - ps_codec->s_parse.pu4_pic_pu_idx[cur_ctb_idx]; in ihevcd_parse_slice_data()
2923 cur_pu_idx = ps_codec->s_parse.pu4_pic_pu_idx[cur_ctb_idx]; in ihevcd_parse_slice_data()
2926 + (ps_codec->s_parse.i4_ctb_x * ctb_size / MIN_PU_SIZE); in ihevcd_parse_slice_data()
2935 s_mv_ctxt.i4_ctb_x = ps_codec->s_parse.i4_ctb_x; in ihevcd_parse_slice_data()
2936 s_mv_ctxt.i4_ctb_y = ps_codec->s_parse.i4_ctb_y; in ihevcd_parse_slice_data()
2937 s_mv_ctxt.ps_pu = &ps_codec->s_parse.ps_pic_pu[cur_pu_idx]; in ihevcd_parse_slice_data()
2938 s_mv_ctxt.ps_pic_pu = ps_codec->s_parse.ps_pic_pu; in ihevcd_parse_slice_data()
2941 s_mv_ctxt.pu4_pic_pu_idx = ps_codec->s_parse.pu4_pic_pu_idx; in ihevcd_parse_slice_data()
2942 s_mv_ctxt.pu1_pic_pu_map = ps_codec->s_parse.pu1_pic_pu_map; in ihevcd_parse_slice_data()
2958 UWORD8 *pu1_pic_pu_map_ctb = ps_codec->s_parse.pu1_pic_pu_map + in ihevcd_parse_slice_data()
2959 …(ps_codec->s_parse.i4_ctb_x + ps_codec->s_parse.i4_ctb_y * ps_sps->i2_pic_wd_in_ctb) * num_minpu_i… in ihevcd_parse_slice_data()
2960 …process_ctxt_t *ps_proc = &ps_codec->as_process[(ps_codec->i4_num_cores == 1) ? 1 : (ps_codec->i4_… in ihevcd_parse_slice_data()
2983 cur_ctb_idx = ps_codec->s_parse.i4_ctb_x in ihevcd_parse_slice_data()
2984 + ps_codec->s_parse.i4_ctb_y * (ps_sps->i2_pic_wd_in_ctb); in ihevcd_parse_slice_data()
2985 next_ctb_idx = ps_codec->s_parse.i4_next_pu_ctb_cnt; in ihevcd_parse_slice_data()
2986 num_pu_per_ctb = ps_codec->s_parse.pu4_pic_pu_idx[next_ctb_idx] in ihevcd_parse_slice_data()
2987 - ps_codec->s_parse.pu4_pic_pu_idx[cur_ctb_idx]; in ihevcd_parse_slice_data()
2988 ctb_start_pu_idx = ps_codec->s_parse.pu4_pic_pu_idx[cur_ctb_idx]; in ihevcd_parse_slice_data()
2989 ps_pu = &ps_codec->s_parse.ps_pic_pu[ctb_start_pu_idx]; in ihevcd_parse_slice_data()
3010 - (ps_codec->s_parse.i4_ctb_y << ps_sps->i1_log2_ctb_size); in ihevcd_parse_slice_data()
3015 …ps_proc->u4_ctb_top_left_pu_idx = ps_proc->pu4_pic_pu_idx_top[(ps_codec->s_parse.i4_ctb_x * ctb_si… in ihevcd_parse_slice_data()
3024 … ps_proc->pu4_pic_pu_idx_top[(ps_codec->s_parse.i4_ctb_x * ctb_size / MIN_PU_SIZE) + i] = in ihevcd_parse_slice_data()
3037 if(0 == ps_codec->i4_disable_deblk_pic) in ihevcd_parse_slice_data()
3041 if((0 == ps_codec->i4_slice_error)) in ihevcd_parse_slice_data()
3049 … ps_proc = &ps_codec->as_process[(ps_codec->i4_num_cores == 1) ? 1 : (ps_codec->i4_num_cores - 1)]; in ihevcd_parse_slice_data()
3050 cur_ctb_idx = ps_codec->s_parse.i4_ctb_x in ihevcd_parse_slice_data()
3051 + ps_codec->s_parse.i4_ctb_y * (ps_sps->i2_pic_wd_in_ctb); in ihevcd_parse_slice_data()
3053 cur_pu_idx = ps_codec->s_parse.pu4_pic_pu_idx[cur_ctb_idx]; in ihevcd_parse_slice_data()
3054 next_ctb_idx = ps_codec->s_parse.i4_next_tu_ctb_cnt; in ihevcd_parse_slice_data()
3055 if(1 == ps_codec->i4_num_cores) in ihevcd_parse_slice_data()
3057 i4_ctb_tu_cnt = ps_codec->s_parse.pu4_pic_tu_idx[next_ctb_idx] - in ihevcd_parse_slice_data()
3058 … ps_codec->s_parse.pu4_pic_tu_idx[cur_ctb_idx % RESET_TU_BUF_NCTB]; in ihevcd_parse_slice_data()
3060 … cur_tu_idx = ps_codec->s_parse.pu4_pic_tu_idx[cur_ctb_idx % RESET_TU_BUF_NCTB]; in ihevcd_parse_slice_data()
3064 i4_ctb_tu_cnt = ps_codec->s_parse.pu4_pic_tu_idx[next_ctb_idx] - in ihevcd_parse_slice_data()
3065 ps_codec->s_parse.pu4_pic_tu_idx[cur_ctb_idx]; in ihevcd_parse_slice_data()
3067 cur_tu_idx = ps_codec->s_parse.pu4_pic_tu_idx[cur_ctb_idx]; in ihevcd_parse_slice_data()
3070 ps_codec->s_parse.s_bs_ctxt.ps_pps = ps_codec->s_parse.ps_pps; in ihevcd_parse_slice_data()
3071 ps_codec->s_parse.s_bs_ctxt.ps_sps = ps_codec->s_parse.ps_sps; in ihevcd_parse_slice_data()
3072 ps_codec->s_parse.s_bs_ctxt.ps_codec = ps_codec; in ihevcd_parse_slice_data()
3073 ps_codec->s_parse.s_bs_ctxt.i4_ctb_tu_cnt = i4_ctb_tu_cnt; in ihevcd_parse_slice_data()
3074 ps_codec->s_parse.s_bs_ctxt.i4_ctb_x = ps_codec->s_parse.i4_ctb_x; in ihevcd_parse_slice_data()
3075 ps_codec->s_parse.s_bs_ctxt.i4_ctb_y = ps_codec->s_parse.i4_ctb_y; in ihevcd_parse_slice_data()
3076 ps_codec->s_parse.s_bs_ctxt.i4_ctb_tile_x = ps_codec->s_parse.i4_ctb_tile_x; in ihevcd_parse_slice_data()
3077 ps_codec->s_parse.s_bs_ctxt.i4_ctb_tile_y = ps_codec->s_parse.i4_ctb_tile_y; in ihevcd_parse_slice_data()
3078 ps_codec->s_parse.s_bs_ctxt.i4_ctb_slice_x = ps_codec->s_parse.i4_ctb_slice_x; in ihevcd_parse_slice_data()
3079 ps_codec->s_parse.s_bs_ctxt.i4_ctb_slice_y = ps_codec->s_parse.i4_ctb_slice_y; in ihevcd_parse_slice_data()
3080 ps_codec->s_parse.s_bs_ctxt.ps_tu = &ps_codec->s_parse.ps_pic_tu[cur_tu_idx]; in ihevcd_parse_slice_data()
3081 ps_codec->s_parse.s_bs_ctxt.ps_pu = &ps_codec->s_parse.ps_pic_pu[cur_pu_idx]; in ihevcd_parse_slice_data()
3082 ps_codec->s_parse.s_bs_ctxt.pu4_pic_pu_idx_map = ps_proc->pu4_pic_pu_idx_map; in ihevcd_parse_slice_data()
3083 … ps_codec->s_parse.s_bs_ctxt.i4_next_pu_ctb_cnt = ps_codec->s_parse.i4_next_pu_ctb_cnt; in ihevcd_parse_slice_data()
3084 … ps_codec->s_parse.s_bs_ctxt.i4_next_tu_ctb_cnt = ps_codec->s_parse.i4_next_tu_ctb_cnt; in ihevcd_parse_slice_data()
3085 ps_codec->s_parse.s_bs_ctxt.pu1_slice_idx = ps_codec->s_parse.pu1_slice_idx; in ihevcd_parse_slice_data()
3086 ps_codec->s_parse.s_bs_ctxt.ps_slice_hdr = ps_codec->s_parse.ps_slice_hdr; in ihevcd_parse_slice_data()
3087 ps_codec->s_parse.s_bs_ctxt.ps_tile = ps_codec->s_parse.ps_tile; in ihevcd_parse_slice_data()
3091 ihevcd_ctb_boundary_strength_islice(&ps_codec->s_parse.s_bs_ctxt); in ihevcd_parse_slice_data()
3095 ihevcd_ctb_boundary_strength_pbslice(&ps_codec->s_parse.s_bs_ctxt); in ihevcd_parse_slice_data()
3104 … UWORD32 *pu4_vert_bs = (UWORD32 *)((UWORD8 *)ps_codec->s_parse.s_bs_ctxt.pu4_pic_vert_bs + in ihevcd_parse_slice_data()
3105 ps_codec->s_parse.i4_ctb_x * (ctb_size * ctb_size / 8 / 16) + in ihevcd_parse_slice_data()
3106 ps_codec->s_parse.i4_ctb_y * bs_strd); in ihevcd_parse_slice_data()
3107 … UWORD32 *pu4_horz_bs = (UWORD32 *)((UWORD8 *)ps_codec->s_parse.s_bs_ctxt.pu4_pic_horz_bs + in ihevcd_parse_slice_data()
3108 ps_codec->s_parse.i4_ctb_x * (ctb_size * ctb_size / 8 / 16) + in ihevcd_parse_slice_data()
3109 ps_codec->s_parse.i4_ctb_y * bs_strd); in ihevcd_parse_slice_data()
3121 sps_t *ps_sps = ps_codec->s_parse.ps_sps; in ihevcd_parse_slice_data()
3124 idx = (ps_codec->s_parse.i4_ctb_x); in ihevcd_parse_slice_data()
3125 idx += ((ps_codec->s_parse.i4_ctb_y) * ps_sps->i2_pic_wd_in_ctb); in ihevcd_parse_slice_data()
3126 pu1_buf = (ps_codec->pu1_parse_map + idx); in ihevcd_parse_slice_data()
3131 ps_codec->s_parse.i4_ctb_tile_x++; in ihevcd_parse_slice_data()
3132 ps_codec->s_parse.i4_ctb_x++; in ihevcd_parse_slice_data()
3133 ps_codec->s_parse.i4_ctb_slice_x++; in ihevcd_parse_slice_data()
3147 if(ps_codec->s_parse.i4_ctb_slice_x == (ps_tile->u1_pos_x + ps_tile->u2_wd)) in ihevcd_parse_slice_data()
3150 ps_codec->s_parse.i4_ctb_slice_y++; in ihevcd_parse_slice_data()
3151 ps_codec->s_parse.i4_ctb_slice_x = ps_tile->u1_pos_x; //todo:Check in ihevcd_parse_slice_data()
3155 else if(ps_codec->s_parse.i4_ctb_slice_x == (ps_tile->u2_wd)) in ihevcd_parse_slice_data()
3157 ps_codec->s_parse.i4_ctb_slice_y++; in ihevcd_parse_slice_data()
3158 ps_codec->s_parse.i4_ctb_slice_x = 0; in ihevcd_parse_slice_data()
3163 if(ps_codec->s_parse.i4_ctb_slice_x == ps_tile->u2_wd) in ihevcd_parse_slice_data()
3166 ps_codec->s_parse.i4_ctb_slice_y++; in ihevcd_parse_slice_data()
3167 ps_codec->s_parse.i4_ctb_slice_x = 0; in ihevcd_parse_slice_data()
3172 if(ps_codec->s_parse.i4_ctb_tile_x == (ps_tile->u2_wd)) in ihevcd_parse_slice_data()
3175 ps_codec->s_parse.i4_ctb_tile_x = 0; in ihevcd_parse_slice_data()
3176 ps_codec->s_parse.i4_ctb_x = ps_tile->u1_pos_x; in ihevcd_parse_slice_data()
3178 ps_codec->s_parse.i4_ctb_tile_y++; in ihevcd_parse_slice_data()
3179 ps_codec->s_parse.i4_ctb_y++; in ihevcd_parse_slice_data()
3181 if(ps_codec->s_parse.i4_ctb_tile_y == (ps_tile->u2_ht)) in ihevcd_parse_slice_data()
3184 ps_codec->s_parse.i4_ctb_tile_y = 0; in ihevcd_parse_slice_data()
3185 ps_codec->s_parse.i4_ctb_tile_x = 0; in ihevcd_parse_slice_data()
3186 ps_codec->s_parse.ps_tile++; in ihevcd_parse_slice_data()
3192 ps_codec->s_parse.i4_ctb_x = 0; in ihevcd_parse_slice_data()
3193 ps_codec->s_parse.i4_ctb_y = ps_sps->i2_pic_ht_in_ctb; in ihevcd_parse_slice_data()
3198 ps_tile = ps_codec->s_parse.ps_tile; in ihevcd_parse_slice_data()
3199 ps_codec->s_parse.i4_ctb_x = ps_tile->u1_pos_x; in ihevcd_parse_slice_data()
3200 ps_codec->s_parse.i4_ctb_y = ps_tile->u1_pos_y; in ihevcd_parse_slice_data()
3201 ps_codec->s_parse.i4_ctb_tile_y = 0; in ihevcd_parse_slice_data()
3202 ps_codec->s_parse.i4_ctb_tile_x = 0; in ihevcd_parse_slice_data()
3203 ps_codec->s_parse.i4_ctb_slice_x = ps_tile->u1_pos_x; in ihevcd_parse_slice_data()
3204 ps_codec->s_parse.i4_ctb_slice_y = ps_tile->u1_pos_y; in ihevcd_parse_slice_data()
3211 ps_codec->s_parse.i4_next_ctb_indx = ps_codec->s_parse.i4_ctb_x + in ihevcd_parse_slice_data()
3212 ps_codec->s_parse.i4_ctb_y * ps_sps->i2_pic_wd_in_ctb; in ihevcd_parse_slice_data()
3216 if(ps_codec->i4_slice_error) in ihevcd_parse_slice_data()
3222 if(ps_codec->s_parse.i4_next_ctb_indx == next_slice_addr) in ihevcd_parse_slice_data()
3229 if((1 == ps_codec->i4_num_cores) && (ps_codec->s_parse.i4_ctb_tile_x == 0)) in ihevcd_parse_slice_data()
3231 process_ctxt_t *ps_proc = &ps_codec->as_process[0]; in ihevcd_parse_slice_data()
3240 if((UWORD8 *)ps_codec->s_parse.s_bitstrm.pu1_buf_max + BITSTRM_OFF_THRS < in ihevcd_parse_slice_data()
3241 … ((UWORD8 *)ps_codec->s_parse.s_bitstrm.pu4_buf + (ps_codec->s_parse.s_bitstrm.u4_bit_ofst / 8))) in ihevcd_parse_slice_data()
3245 if(0 == ps_codec->i4_slice_error) in ihevcd_parse_slice_data()
3261 parse_slice_idx = ps_codec->s_parse.i4_cur_slice_idx; in ihevcd_parse_slice_data()
3266 … if((1 == ps_codec->i4_num_cores) || (0 != (parse_slice_idx & (MAX_SLICE_HDR_CNT - 1)))) in ihevcd_parse_slice_data()
3268 ps_codec->s_parse.i4_cur_slice_idx = parse_slice_idx; in ihevcd_parse_slice_data()
3279 WORD32 parse_status = *(ps_codec->pu1_parse_map + ctb_indx); in ihevcd_parse_slice_data()
3280 volatile WORD32 proc_status = *(ps_codec->pu1_proc_map + ctb_indx) & 1; in ihevcd_parse_slice_data()
3285 ps_codec->s_parse.i4_cur_slice_idx = parse_slice_idx; in ihevcd_parse_slice_data()
3296 if(FRAME_ILF_PAD && 1 == ps_codec->i4_num_cores) in ihevcd_parse_slice_data()
3300 DUMP_PRE_ILF(ps_codec->as_process[0].pu1_cur_pic_luma, in ihevcd_parse_slice_data()
3301 ps_codec->as_process[0].pu1_cur_pic_chroma, in ihevcd_parse_slice_data()
3304 ps_codec->i4_strd); in ihevcd_parse_slice_data()
3306 DUMP_BS(ps_codec->as_process[0].s_bs_ctxt.pu4_pic_vert_bs, in ihevcd_parse_slice_data()
3307 ps_codec->as_process[0].s_bs_ctxt.pu4_pic_horz_bs, in ihevcd_parse_slice_data()
3311 DUMP_QP(ps_codec->as_process[0].s_bs_ctxt.pu1_pic_qp, in ihevcd_parse_slice_data()
3314 DUMP_QP_CONST_IN_CTB(ps_codec->as_process[0].s_bs_ctxt.pu1_pic_qp_const_in_ctb, in ihevcd_parse_slice_data()
3317 DUMP_NO_LOOP_FILTER(ps_codec->as_process[0].pu1_pic_no_loop_filter_flag, in ihevcd_parse_slice_data()
3325 ps_codec->s_parse.s_deblk_ctxt.ps_pps = ps_codec->s_parse.ps_pps; in ihevcd_parse_slice_data()
3326 ps_codec->s_parse.s_deblk_ctxt.ps_sps = ps_codec->s_parse.ps_sps; in ihevcd_parse_slice_data()
3327 ps_codec->s_parse.s_deblk_ctxt.ps_codec = ps_codec; in ihevcd_parse_slice_data()
3328 ps_codec->s_parse.s_deblk_ctxt.ps_slice_hdr = ps_codec->s_parse.ps_slice_hdr; in ihevcd_parse_slice_data()
3329 …ps_codec->s_parse.s_deblk_ctxt.is_chroma_yuv420sp_vu = (ps_codec->e_ref_chroma_fmt == IV_YUV_420SP… in ihevcd_parse_slice_data()
3331 ps_codec->s_parse.s_sao_ctxt.ps_pps = ps_codec->s_parse.ps_pps; in ihevcd_parse_slice_data()
3332 ps_codec->s_parse.s_sao_ctxt.ps_sps = ps_codec->s_parse.ps_sps; in ihevcd_parse_slice_data()
3333 ps_codec->s_parse.s_sao_ctxt.ps_codec = ps_codec; in ihevcd_parse_slice_data()
3334 ps_codec->s_parse.s_sao_ctxt.ps_slice_hdr = ps_codec->s_parse.ps_slice_hdr; in ihevcd_parse_slice_data()
3336 ihevcd_ilf_pad_frame(&ps_codec->s_parse.s_deblk_ctxt, &ps_codec->s_parse.s_sao_ctxt); in ihevcd_parse_slice_data()
3340 ps_codec->s_parse.i4_end_of_frame = 1; in ihevcd_parse_slice_data()