Lines Matching refs:s_parse
129 bitstrm_t *ps_bitstrm = &ps_codec->s_parse.s_bitstrm;
133 cab_ctxt_t *ps_cabac = &ps_codec->s_parse.s_cabac;
135 max_trafo_depth = ps_codec->s_parse.s_cu.i4_max_trafo_depth;
136 ps_sps = ps_codec->s_parse.ps_sps;
137 ps_pps = ps_codec->s_parse.ps_pps;
138 intra_split_flag = ps_codec->s_parse.s_cu.i4_intra_split_flag;
161 (PRED_MODE_INTER == ps_codec->s_parse.s_cu.i4_pred_mode) &&
162 (PART_2Nx2N != ps_codec->s_parse.s_cu.i4_part_mode) &&
178 ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth] = 0;
179 ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth] = 0;
183 ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth] = ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth - 1];
184 ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth] = ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth - 1];
190 if((trafo_depth == 0) || ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth - 1])
195 ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth] = value;
198 if((trafo_depth == 0) || ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth - 1])
203 ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth] = value;
216 intra_pred_mode_tmp = trafo_depth ? intra_pred_mode : ps_codec->s_parse.s_cu.ai4_intra_luma_pred_mode[0];
219 intra_pred_mode_tmp = trafo_depth ? intra_pred_mode : ps_codec->s_parse.s_cu.ai4_intra_luma_pred_mode[1];
222 intra_pred_mode_tmp = trafo_depth ? intra_pred_mode : ps_codec->s_parse.s_cu.ai4_intra_luma_pred_mode[2];
225 intra_pred_mode_tmp = trafo_depth ? intra_pred_mode : ps_codec->s_parse.s_cu.ai4_intra_luma_pred_mode[3];
237 tu_t *ps_tu = ps_codec->s_parse.ps_tu;
239 ctb_x_base = ps_codec->s_parse.i4_ctb_x << ps_sps->i1_log2_ctb_size;
240 ctb_y_base = ps_codec->s_parse.i4_ctb_y << ps_sps->i1_log2_ctb_size;
242 if((ps_codec->s_parse.s_cu.i4_pred_mode == PRED_MODE_INTRA) ||
244 (ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth]) ||
245 (ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth]))
254 ps_codec->s_parse.s_cu.i1_cbf_luma = value;
258 ps_codec->s_parse.s_cu.i1_cbf_luma = 1;
268 ps_tu->b1_transquant_bypass = ps_codec->s_parse.s_cu.i4_cu_transquant_bypass;
270 ps_tu->b7_qp = ps_codec->s_parse.u4_qp;
273 ps_tu->b3_chroma_intra_mode_idx = ps_codec->s_parse.s_cu.i4_intra_chroma_pred_mode_idx;
276 if(ps_codec->s_parse.s_cu.i1_cbf_luma ||
277 ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth] ||
278 ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth])
281 if(ps_pps->i1_cu_qp_delta_enabled_flag && !ps_codec->s_parse.i4_is_cu_qp_delta_coded)
306 ps_codec->s_parse.i4_is_cu_qp_delta_coded = 1;
318 ps_codec->s_parse.s_cu.i4_cu_qp_delta = cu_qp_delta_abs;
322 if(ps_codec->s_parse.s_cu.i1_cbf_luma)
328 if(4 == ps_codec->s_parse.s_cu.i4_intra_chroma_pred_mode_idx)
329 intra_pred_mode_chroma = ps_codec->s_parse.s_cu.ai4_intra_luma_pred_mode[0];
332 intra_pred_mode_chroma = gau1_intra_pred_chroma_modes[ps_codec->s_parse.s_cu.i4_intra_chroma_pred_mode_idx];
335 ps_codec->s_parse.s_cu.ai4_intra_luma_pred_mode[0])
343 if(ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth])
349 if(ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth])
357 if(ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth])
363 if(ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth])
385 if((ps_codec->s_parse.s_cu.i4_pos_x << 3) == (ps_tu->b4_pos_x << 2) &&
386 (ps_codec->s_parse.s_cu.i4_pos_y << 3) == (ps_tu->b4_pos_y << 2))
395 ps_codec->s_parse.ps_tu++;
396 ps_codec->s_parse.s_cu.i4_tu_cnt++;
397 ps_codec->s_parse.i4_pic_tu_idx++;
426 bitstrm_t *ps_bitstrm = &ps_codec->s_parse.s_bitstrm;
430 cab_ctxt_t *ps_cabac = &ps_codec->s_parse.s_cabac;
530 cab_ctxt_t *ps_cabac = &ps_codec->s_parse.s_cabac;
538 bitstrm_t *ps_bitstrm = &ps_codec->s_parse.s_bitstrm;
539 tu_t *ps_tu = ps_codec->s_parse.ps_tu;
542 ps_sps = ps_codec->s_parse.ps_sps;
552 WORD8 *pi1_buf = (WORD8 *)ps_codec->s_parse.pv_tu_coeff_data;
567 ps_codec->s_parse.pv_tu_coeff_data = pi1_buf;
572 ps_tu_sblk_coeff_data = (tu_sblk_coeff_data_t *)ps_codec->s_parse.pv_tu_coeff_data;
600 ps_codec->s_parse.pv_tu_coeff_data = pu1_coeff_data;
629 bitstrm_t *ps_bitstrm = &ps_codec->s_parse.s_bitstrm;
630 cab_ctxt_t *ps_cabac = &ps_codec->s_parse.s_cabac;
633 ps_slice_hdr = ps_codec->s_parse.ps_slice_hdr;
653 ctxt_idx = IHEVC_CAB_INTER_PRED_IDC + ps_codec->s_parse.i4_ct_depth;
811 bitstrm_t *ps_bitstrm = &ps_codec->s_parse.s_bitstrm;
815 pu_t *ps_pu = ps_codec->s_parse.ps_pu;
816 cab_ctxt_t *ps_cabac = &ps_codec->s_parse.s_cabac;
818 ps_slice_hdr = ps_codec->s_parse.ps_slice_hdr;
823 ps_sps = ps_codec->s_parse.ps_sps;
824 ctb_x_base = ps_codec->s_parse.i4_ctb_x << ps_sps->i1_log2_ctb_size;
825 ctb_y_base = ps_codec->s_parse.i4_ctb_y << ps_sps->i1_log2_ctb_size;
833 ps_pu->b3_part_mode = ps_codec->s_parse.s_cu.i4_part_mode;
835 if(PRED_MODE_SKIP == ps_codec->s_parse.s_cu.i4_pred_mode)
904 ps_codec->s_parse.ps_pu++;
905 ps_codec->s_parse.i4_pic_pu_idx++;
953 cab_ctxt_t *ps_cabac = &ps_codec->s_parse.s_cabac;
954 bitstrm_t *ps_bitstrm = &ps_codec->s_parse.s_bitstrm;
958 WORD32 part_mode = ps_codec->s_parse.s_cu.i4_part_mode;
959 tu_t *ps_tu = ps_codec->s_parse.ps_tu;
960 pu_t *ps_pu = ps_codec->s_parse.ps_pu;
963 ps_sps = ps_codec->s_parse.ps_sps;
964 ctb_x_base = ps_codec->s_parse.i4_ctb_x << ps_sps->i1_log2_ctb_size;
965 ctb_y_base = ps_codec->s_parse.i4_ctb_y << ps_sps->i1_log2_ctb_size;
986 ps_codec->s_parse.i4_cu_pcm_flag = pcm_flag;
992 if(ps_codec->s_parse.s_bitstrm.u4_bit_ofst % 8)
995 ihevcd_bits_flush_to_byte_boundary(&ps_codec->s_parse.s_bitstrm);
1001 ihevcd_cabac_reset(&ps_codec->s_parse.s_cabac,
1002 &ps_codec->s_parse.s_bitstrm);
1004 ps_tu = ps_codec->s_parse.ps_tu;
1012 ps_tu->b7_qp = ps_codec->s_parse.u4_qp;
1018 if((ps_codec->s_parse.s_cu.i4_pos_x << 3) == (ps_tu->b4_pos_x << 2) &&
1019 (ps_codec->s_parse.s_cu.i4_pos_y << 3) == (ps_tu->b4_pos_y << 2))
1030 pu1_luma_intra_pred_mode_top = ps_codec->s_parse.pu1_luma_intra_pred_mode_top
1031 + (ps_codec->s_parse.s_cu.i4_pos_x * 2);
1033 pu1_luma_intra_pred_mode_left = ps_codec->s_parse.pu1_luma_intra_pred_mode_left
1034 + (ps_codec->s_parse.s_cu.i4_pos_y * 2);
1049 pu1_pic_no_loop_filter_flag = ps_codec->s_parse.pu1_pic_no_loop_filter_flag;
1063 ps_codec->s_parse.ps_tu++;
1064 ps_codec->s_parse.s_cu.i4_tu_cnt++;
1065 ps_codec->s_parse.i4_pic_tu_idx++;
1083 ps_codec->s_parse.s_cu.ai4_prev_intra_luma_pred_flag[i] =
1090 if(ps_codec->s_parse.s_cu.ai4_prev_intra_luma_pred_flag[cnt])
1094 ps_codec->s_parse.s_cu.ai4_mpm_idx[cnt] = value;
1101 ps_codec->s_parse.s_cu.ai4_rem_intra_luma_pred_mode[cnt] =
1110 ps_codec->s_parse.s_cu.i4_intra_chroma_pred_mode_idx = 4;
1113 ps_codec->s_parse.s_cu.i4_intra_chroma_pred_mode_idx =
1118 ps_codec->s_parse.s_cu.i4_intra_chroma_pred_mode_idx,
1126 ps_codec->s_parse.ps_pu++;
1127 ps_codec->s_parse.i4_pic_pu_idx++;
1163 UWORD32 *pu4_skip_top = ps_codec->s_parse.pu4_skip_cu_top;
1164 UWORD32 u4_skip_left = ps_codec->s_parse.u4_skip_cu_left;
1165 bitstrm_t *ps_bitstrm = &ps_codec->s_parse.s_bitstrm;
1166 tu_t *ps_tu = ps_codec->s_parse.ps_tu;
1170 cab_ctxt_t *ps_cabac = &ps_codec->s_parse.s_cabac;
1175 ps_codec->s_parse.s_cu.i4_tu_cnt = 0;
1176 ps_sps = ps_codec->s_parse.ps_sps;
1177 ps_pps = ps_codec->s_parse.ps_pps;
1179 cu_pos_x = ps_codec->s_parse.s_cu.i4_pos_x;
1180 cu_pos_y = ps_codec->s_parse.s_cu.i4_pos_y;
1184 ps_slice_hdr = ps_codec->s_parse.ps_slice_hdr;
1189 ps_codec->s_parse.s_cu.i4_cu_transquant_bypass = 0;
1194 ps_codec->s_parse.s_cu.i4_cu_transquant_bypass =
1199 AEV_TRACE("cu_transquant_bypass_flag", ps_codec->s_parse.s_cu.i4_cu_transquant_bypass,
1202 if(ps_codec->s_parse.s_cu.i4_cu_transquant_bypass)
1204 UWORD8 *pu1_pic_no_loop_filter_flag = ps_codec->s_parse.pu1_pic_no_loop_filter_flag;
1239 ((0 != ps_codec->s_parse.i4_ctb_slice_y) &&
1240 (0 != ps_codec->s_parse.i4_ctb_tile_y)))
1255 (((0 != ps_codec->s_parse.i4_ctb_slice_x) || (0 != ps_codec->s_parse.i4_ctb_slice_y)) &&
1256 (0 != ps_codec->s_parse.i4_ctb_tile_x)))
1293 u4_skip_left = ps_codec->s_parse.u4_skip_cu_left;
1305 ps_codec->s_parse.u4_skip_cu_left = u4_skip_left;
1307 ps_codec->s_parse.i4_cu_pcm_flag = 0;
1314 ctb_x_base = ps_codec->s_parse.i4_ctb_x << ps_sps->i1_log2_ctb_size;
1315 ctb_y_base = ps_codec->s_parse.i4_ctb_y << ps_sps->i1_log2_ctb_size;
1324 ps_tu->b7_qp = ps_codec->s_parse.u4_qp;
1330 if((ps_codec->s_parse.s_cu.i4_pos_x << 3) == (ps_tu->b4_pos_x << 2) &&
1331 (ps_codec->s_parse.s_cu.i4_pos_y << 3) == (ps_tu->b4_pos_y << 2))
1341 ps_codec->s_parse.ps_tu++;
1342 ps_codec->s_parse.s_cu.i4_tu_cnt++;
1343 ps_codec->s_parse.i4_pic_tu_idx++;
1345 ps_codec->s_parse.s_cu.i4_pred_mode = PRED_MODE_SKIP;
1346 ps_codec->s_parse.s_cu.i4_part_mode = PART_2Nx2N;
1348 pu_t *ps_pu = ps_codec->s_parse.ps_pu;
1380 UWORD8 *pu1_pic_intra_flag = ps_codec->s_parse.pu1_pic_intra_flag;
1398 ps_codec->s_parse.s_cu.i4_pred_mode = pred_mode;
1457 ps_codec->s_parse.s_cu.i4_part_mode = part_mode;
1459 if((PRED_MODE_INTRA == ps_codec->s_parse.s_cu.i4_pred_mode) &&
1460 (PART_NxN == ps_codec->s_parse.s_cu.i4_part_mode))
1464 ps_codec->s_parse.s_cu.i4_part_mode = part_mode;
1465 ps_codec->s_parse.s_cu.i4_intra_split_flag = intra_split_flag;
1468 ps_codec->s_parse.i4_cu_pcm_flag = 0;
1470 pcm_flag = ps_codec->s_parse.i4_cu_pcm_flag;
1477 pu_t *ps_pu = ps_codec->s_parse.ps_pu;
1483 pu_t *ps_pu = ps_codec->s_parse.ps_pu;
1488 ps_pu = ps_codec->s_parse.ps_pu;
1495 pu_t *ps_pu = ps_codec->s_parse.ps_pu;
1498 ps_pu = ps_codec->s_parse.ps_pu;
1505 pu_t *ps_pu = ps_codec->s_parse.ps_pu;
1508 ps_pu = ps_codec->s_parse.ps_pu;
1515 pu_t *ps_pu = ps_codec->s_parse.ps_pu;
1518 ps_pu = ps_codec->s_parse.ps_pu;
1525 pu_t *ps_pu = ps_codec->s_parse.ps_pu;
1528 ps_pu = ps_codec->s_parse.ps_pu;
1535 pu_t *ps_pu = ps_codec->s_parse.ps_pu;
1538 ps_pu = ps_codec->s_parse.ps_pu;
1544 pu_t *ps_pu = ps_codec->s_parse.ps_pu;
1548 ps_pu = ps_codec->s_parse.ps_pu;
1552 ps_pu = ps_codec->s_parse.ps_pu;
1556 ps_pu = ps_codec->s_parse.ps_pu;
1570 ps_pu = ps_codec->s_parse.ps_pu - 1;
1594 ps_codec->s_parse.s_cu.i4_max_trafo_depth = (pred_mode == PRED_MODE_INTRA) ?
1599 ps_codec->s_parse.s_cu.ai4_intra_luma_pred_mode[0]);
1606 ctb_x_base = ps_codec->s_parse.i4_ctb_x << ps_sps->i1_log2_ctb_size;
1607 ctb_y_base = ps_codec->s_parse.i4_ctb_y << ps_sps->i1_log2_ctb_size;
1609 ps_tu = ps_codec->s_parse.ps_tu;
1617 ps_tu->b7_qp = ps_codec->s_parse.u4_qp;
1619 ps_tu->b6_luma_intra_mode = ps_codec->s_parse.s_cu.ai4_intra_luma_pred_mode[0];
1623 if((ps_codec->s_parse.s_cu.i4_pos_x << 3) == (ps_tu->b4_pos_x << 2) &&
1624 (ps_codec->s_parse.s_cu.i4_pos_y << 3) == (ps_tu->b4_pos_y << 2))
1633 ps_codec->s_parse.ps_tu++;
1634 ps_codec->s_parse.s_cu.i4_tu_cnt++;
1635 ps_codec->s_parse.i4_pic_tu_idx++;
1683 bitstrm_t *ps_bitstrm = &ps_codec->s_parse.s_bitstrm;
1684 cab_ctxt_t *ps_cabac = &ps_codec->s_parse.s_cabac;
1686 ps_sps = ps_codec->s_parse.ps_sps;
1687 ps_pps = ps_codec->s_parse.ps_pps;
1690 cu_pos_x = (x0 - (ps_codec->s_parse.i4_ctb_x << ps_sps->i1_log2_ctb_size)) >> 3;
1691 cu_pos_y = (y0 - (ps_codec->s_parse.i4_ctb_y << ps_sps->i1_log2_ctb_size)) >> 3;
1693 ps_codec->s_parse.s_cu.i4_pos_x = cu_pos_x;
1694 ps_codec->s_parse.s_cu.i4_pos_y = cu_pos_y;
1696 ps_codec->s_parse.s_cu.i4_log2_cb_size = log2_cb_size;
1698 ps_codec->s_parse.i4_ct_depth = ct_depth;
1700 UWORD32 *pu4_ct_depth_top = ps_codec->s_parse.pu4_ct_depth_top;
1701 UWORD32 u4_ct_depth_left = ps_codec->s_parse.u4_ct_depth_left;
1725 ((0 != ps_codec->s_parse.i4_ctb_slice_y) &&
1726 (0 != ps_codec->s_parse.i4_ctb_tile_y)))
1744 (((0 != ps_codec->s_parse.i4_ctb_slice_x) || (0 != ps_codec->s_parse.i4_ctb_slice_y)) &&
1745 (0 != ps_codec->s_parse.i4_ctb_tile_x)))
1788 u4_ct_depth_left = ps_codec->s_parse.u4_ct_depth_left;
1801 ps_codec->s_parse.u4_ct_depth_left = u4_ct_depth_left;
1807 ps_codec->s_parse.i4_is_cu_qp_delta_coded = 0;
1808 ps_codec->s_parse.i4_cu_qp_delta = 0;
1832 WORD32 cu_pos_x = ps_codec->s_parse.s_cu.i4_pos_x << 3;
1833 WORD32 cu_pos_y = ps_codec->s_parse.s_cu.i4_pos_y << 3;
1841 ps_codec->s_parse.u4_qpg = ps_codec->s_parse.u4_qp;
1843 ps_codec->s_parse.s_cu.i4_cu_qp_delta = 0;
1860 tu_t *ps_tu = ps_codec->s_parse.ps_tu;
1861 WORD32 cb_size = 1 << ps_codec->s_parse.s_cu.i4_log2_cb_size;
1863 cu_pos_x = ps_codec->s_parse.s_cu.i4_pos_x << 3;
1864 cu_pos_y = ps_codec->s_parse.s_cu.i4_pos_y << 3;
1870 qp_left = ps_codec->s_parse.u4_qpg;
1871 qp_top = ps_codec->s_parse.u4_qpg;
1875 qp_left = ps_codec->s_parse.ai1_8x8_cu_qp[qpg_x - 1 + (qpg_y * 8)];
1879 qp_top = ps_codec->s_parse.ai1_8x8_cu_qp[qpg_x + ((qpg_y - 1) * 8)];
1883 /* Since qp_pred + ps_codec->s_parse.s_cu.i4_cu_qp_delta can be negative,
1885 qp = (qp_pred + ps_codec->s_parse.s_cu.i4_cu_qp_delta + 52) % 52;
1892 ps_codec->s_parse.ai1_8x8_cu_qp[cur_cu_offset + (i * 8) + j] = qp;
1896 ps_codec->s_parse.u4_qp = qp;
1897 ps_codec->s_parse.s_cu.i4_qp = qp;
1903 ps_tu_tmp = ps_tu - ps_codec->s_parse.s_cu.i4_tu_cnt;
1904 ps_tu->b7_qp = ps_codec->s_parse.u4_qp;
1907 ps_tu_tmp->b7_qp = ps_codec->s_parse.u4_qp;
1912 if(ps_codec->s_parse.s_cu.i4_cu_qp_delta)
1915 ctb_indx = ps_codec->s_parse.i4_ctb_x + ps_sps->i2_pic_wd_in_ctb * ps_codec->s_parse.i4_ctb_y;
1916 ps_codec->s_parse.s_bs_ctxt.pu1_pic_qp_const_in_ctb[ctb_indx >> 3] &= (~(1 << (ctb_indx & 7)));
1957 bitstrm_t *ps_bitstrm = &ps_codec->s_parse.s_bitstrm;
1961 cab_ctxt_t *ps_cabac = &ps_codec->s_parse.s_cabac;
1964 ps_slice_hdr = ps_codec->s_parse.ps_slice_hdr_base;
1965 ps_slice_hdr += (ps_codec->s_parse.i4_cur_slice_idx & (MAX_SLICE_HDR_CNT - 1));
1967 ps_sps = (ps_codec->s_parse.ps_sps);
1968 rx = ps_codec->s_parse.i4_ctb_x;
1969 ry = ps_codec->s_parse.i4_ctb_y;
1971 ps_sao = ps_codec->s_parse.ps_pic_sao + rx + ry * ps_sps->i2_pic_wd_in_ctb;
1985 if(((0 != ps_codec->s_parse.i4_ctb_slice_x) || (0 != ps_codec->s_parse.i4_ctb_slice_y)) &&
1986 (0 != ps_codec->s_parse.i4_ctb_tile_x))
1999 if((ps_codec->s_parse.i4_ctb_slice_y > 0) && (ps_codec->s_parse.i4_ctb_tile_y > 0))
2192 ps_slice_hdr = ps_codec->s_parse.ps_slice_hdr_base;
2193 ps_pps = ps_codec->s_parse.ps_pps_base;
2194 ps_sps = ps_codec->s_parse.ps_sps_base;
2197 ps_slice_hdr += (ps_codec->s_parse.i4_cur_slice_idx & (MAX_SLICE_HDR_CNT - 1));
2201 if(0 != ps_codec->s_parse.i4_cur_slice_idx)
2205 ps_codec->s_parse.i4_cur_independent_slice_idx =
2206 ps_codec->s_parse.i4_cur_slice_idx & (MAX_SLICE_HDR_CNT - 1);
2218 ps_codec->s_parse.i4_ctb_x = ps_slice_hdr->i2_ctb_x;
2219 ps_codec->s_parse.i4_ctb_y = ps_slice_hdr->i2_ctb_y;
2221 ps_codec->s_parse.ps_pps = ps_pps;
2222 ps_codec->s_parse.ps_sps = ps_sps;
2223 ps_codec->s_parse.ps_slice_hdr = ps_slice_hdr;
2227 ihevcd_get_tile_pos(ps_pps, ps_sps, ps_codec->s_parse.i4_ctb_x,
2228 ps_codec->s_parse.i4_ctb_y,
2229 &ps_codec->s_parse.i4_ctb_tile_x,
2230 &ps_codec->s_parse.i4_ctb_tile_y,
2232 ps_codec->s_parse.ps_tile = ps_pps->ps_tile + tile_idx;
2233 ps_codec->s_parse.i4_cur_tile_idx = tile_idx;
2234 ps_tile = ps_codec->s_parse.ps_tile;
2247 if((0 == ps_codec->s_parse.i4_ctb_tile_x) && (0 == ps_codec->s_parse.i4_ctb_tile_y))
2249 ps_codec->s_parse.i4_ctb_slice_x = 0;
2250 ps_codec->s_parse.i4_ctb_slice_y = 0;
2256 s_parse.i4_ctb_slice_x = 0;
2257 ps_codec->s_parse.i4_ctb_slice_y = 0;
2262 if((0 == ps_codec->s_parse.i4_ctb_y) &&
2263 (0 == ps_codec->s_parse.i4_ctb_x))
2268 ps_codec->s_parse.pu4_pic_tu_idx[0] = 0;
2269 ps_codec->s_parse.pu4_pic_pu_idx[0] = 0;
2270 ps_codec->s_parse.i4_cur_independent_slice_idx = 0;
2271 ps_codec->s_parse.i4_ctb_tile_x = 0;
2272 ps_codec->s_parse.i4_ctb_tile_y = 0;
2277 mv_buf_t *ps_mv_buf = ps_codec->s_parse.ps_cur_mv_buf;
2283 ps_mv_buf->ai4_l1_collocated_poc[(ps_codec->s_parse.i4_cur_slice_idx & (MAX_SLICE_HDR_CNT - 1))][i] = ((pic_buf_t *)ps_slice_hdr->as_ref_pic_list1[i].pv_pic_buf)->i4_abs_poc;
2284 ps_mv_buf->ai1_l1_collocated_poc_lt[(ps_codec->s_parse.i4_cur_slice_idx & (MAX_SLICE_HDR_CNT - 1))][i] = ((pic_buf_t *)ps_slice_hdr->as_ref_pic_list1[i].pv_pic_buf)->u1_used_as_ref;
2292 ps_mv_buf->ai4_l0_collocated_poc[(ps_codec->s_parse.i4_cur_slice_idx & (MAX_SLICE_HDR_CNT - 1))][i] = ((pic_buf_t *)ps_slice_hdr->as_ref_pic_list0[i].pv_pic_buf)->i4_abs_poc;
2293 ps_mv_buf->ai1_l0_collocated_poc_lt[(ps_codec->s_parse.i4_cur_slice_idx & (MAX_SLICE_HDR_CNT - 1))][i] = ((pic_buf_t *)ps_slice_hdr->as_ref_pic_list0[i].pv_pic_buf)->u1_used_as_ref;
2299 if((0 == ps_codec->s_parse.i4_ctb_slice_x) || (0 == ps_codec->s_parse.i4_ctb_slice_y))
2347 ((1 == ps_slice_hdr->i1_dependent_slice_flag) && ((0 == ps_codec->s_parse.i4_ctb_tile_x) && (0 == ps_codec->s_parse.i4_ctb_tile_y))))
2349 ps_codec->s_parse.u4_qp = slice_qp;
2354 if((1 == ps_slice_hdr->i1_dependent_slice_flag) && (!((ps_codec->s_parse.i4_ctb_tile_x == 0) && (ps_codec->s_parse.i4_ctb_tile_y == 0))))
2356 if((0 == ps_pps->i1_entropy_coding_sync_enabled_flag) || (ps_pps->i1_entropy_coding_sync_enabled_flag && (0 != ps_codec->s_parse.i4_ctb_x)))
2358 ihevcd_cabac_reset(&ps_codec->s_parse.s_cabac,
2359 &ps_codec->s_parse.s_bitstrm);
2362 else if((0 == ps_pps->i1_entropy_coding_sync_enabled_flag) || (ps_pps->i1_entropy_coding_sync_enabled_flag && (0 != ps_codec->s_parse.i4_ctb_x)))
2364 ihevcd_cabac_init(&ps_codec->s_parse.s_cabac,
2365 &ps_codec->s_parse.s_bitstrm,
2376 WORD32 cur_ctb_idx = ps_codec->s_parse.i4_ctb_x
2377 + ps_codec->s_parse.i4_ctb_y * (ps_sps->i2_pic_wd_in_ctb);
2380 ps_codec->s_parse.ps_tu = ps_codec->s_parse.ps_pic_tu;
2381 ps_codec->s_parse.i4_pic_tu_idx = 0;
2391 ps_codec->s_parse.i4_ctb_num_pcm_blks = 0;
2396 if(((0 == ps_codec->s_parse.i4_ctb_tile_x) && (0 == ps_codec->s_parse.i4_ctb_tile_y))
2398 && (!((0 == ps_codec->s_parse.i4_ctb_slice_x) && (0 == ps_codec->s_parse.i4_ctb_slice_y))))
2402 ps_codec->s_parse.u4_qp = slice_qp;
2404 ihevcd_get_tile_pos(ps_pps, ps_sps, ps_codec->s_parse.i4_ctb_x,
2405 ps_codec->s_parse.i4_ctb_y,
2406 &ps_codec->s_parse.i4_ctb_tile_x,
2407 &ps_codec->s_parse.i4_ctb_tile_y,
2410 ps_codec->s_parse.ps_tile = ps_pps->ps_tile + tile_idx;
2411 ps_codec->s_parse.i4_cur_tile_idx = tile_idx;
2426 ps_codec->s_parse.i4_ctb_slice_y = ps_tile->u1_pos_y - ps_slice_hdr->i2_ctb_y;
2434 ps_codec->s_parse.i4_ctb_slice_y -= 1;
2438 /*ps_codec->s_parse.i4_ctb_slice_y = ps_tile->u1_pos_y - ps_slice_hdr->i2_ctb_y;
2444 ps_codec->s_parse.i4_ctb_slice_y -= 1 ;
2452 ihevcd_cabac_init(&ps_codec->s_parse.s_cabac,
2453 &ps_codec->s_parse.s_bitstrm,
2464 if(0 == ps_codec->s_parse.i4_ctb_tile_x)
2473 s_job.i2_ctb_x = (WORD16)ps_codec->s_parse.i4_ctb_x;
2474 s_job.i2_ctb_y = (WORD16)ps_codec->s_parse.i4_ctb_y;
2475 s_job.i2_slice_idx = (WORD16)ps_codec->s_parse.i4_cur_slice_idx;
2476 s_job.i4_tu_coeff_data_ofst = (UWORD8 *)ps_codec->s_parse.pv_tu_coeff_data -
2477 (UWORD8 *)ps_codec->s_parse.pv_pic_tu_coeff_data;
2478 ret = ihevcd_jobq_queue((jobq_t *)ps_codec->s_parse.pv_proc_jobq, &s_job, sizeof(proc_job_t), 1);
2486 WORD32 tu_coeff_data_ofst = (UWORD8 *)ps_codec->s_parse.pv_tu_coeff_data -
2487 (UWORD8 *)ps_codec->s_parse.pv_pic_tu_coeff_data;
2495 ps_proc->i4_ctb_x = ps_codec->s_parse.i4_ctb_x;
2496 ps_proc->i4_ctb_y = ps_codec->s_parse.i4_ctb_y;
2497 ps_proc->i4_cur_slice_idx = ps_codec->s_parse.i4_cur_slice_idx;
2508 if(0 == ps_codec->s_parse.i4_ctb_x)
2510 //WORD32 size = sizeof(ps_codec->s_parse.s_cabac.au1_ctxt_models);
2513 if((0 == ps_codec->s_parse.i4_ctb_slice_y) && (!ps_slice_hdr->i1_dependent_slice_flag))
2518 ps_codec->s_parse.u4_qp = slice_qp;
2521 //memcpy(&ps_codec->s_parse.s_cabac.au1_ctxt_models, &gau1_ihevc_cab_ctxts[cabac_init_idc][slice_qp][0], size);
2522 ihevcd_cabac_init(&ps_codec->s_parse.s_cabac,
2523 &ps_codec->s_parse.s_bitstrm,
2531 //memcpy(&ps_codec->s_parse.s_cabac.au1_ctxt_models, &ps_codec->s_parse.s_cabac.au1_ctxt_models_sync, size);
2532 ihevcd_cabac_init(&ps_codec->s_parse.s_cabac,
2533 &ps_codec->s_parse.s_bitstrm,
2536 (const UWORD8 *)&ps_codec->s_parse.s_cabac.au1_ctxt_models_sync);
2551 sao_t *ps_sao = ps_codec->s_parse.ps_pic_sao +
2552 ps_codec->s_parse.i4_ctb_x +
2553 ps_codec->s_parse.i4_ctb_y * ps_sps->i2_pic_wd_in_ctb;
2561 //AEV_TRACE("CTB x", ps_codec->s_parse.i4_ctb_x, 0);
2562 //AEV_TRACE("CTB y", ps_codec->s_parse.i4_ctb_y, 0);
2566 ctb_indx = ps_codec->s_parse.i4_ctb_x + ps_sps->i2_pic_wd_in_ctb * ps_codec->s_parse.i4_ctb_y;
2567 ps_codec->s_parse.s_bs_ctxt.pu1_pic_qp_const_in_ctb[ctb_indx >> 3] |= (1 << (ctb_indx & 7));
2569 UWORD16 *pu1_slice_idx = ps_codec->s_parse.pu1_slice_idx;
2570 pu1_slice_idx[ctb_indx] = ps_codec->s_parse.i4_cur_independent_slice_idx;
2577 (ps_codec->s_parse.i4_ctb_x << ps_sps->i1_log2_ctb_size),
2578 (ps_codec->s_parse.i4_ctb_y << ps_sps->i1_log2_ctb_size),
2584 tu_t *ps_tu = ps_codec->s_parse.ps_tu;
2585 pu_t *ps_pu = ps_codec->s_parse.ps_pu;
2594 ps_tu->b7_qp = ps_codec->s_parse.u4_qp;
2599 ps_codec->s_parse.ps_tu++;
2600 ps_codec->s_parse.s_cu.i4_tu_cnt++;
2601 ps_codec->s_parse.i4_pic_tu_idx++;
2603 ps_codec->s_parse.s_cu.i4_pred_mode = PRED_MODE_SKIP;
2604 ps_codec->s_parse.s_cu.i4_part_mode = PART_2Nx2N;
2612 ps_pu->b3_part_mode = ps_codec->s_parse.s_cu.i4_part_mode;
2616 ps_codec->s_parse.ps_pu++;
2617 ps_codec->s_parse.i4_pic_pu_idx++;
2622 end_of_slice_flag = ihevcd_cabac_decode_terminate(&ps_codec->s_parse.s_cabac, &ps_codec->s_parse.s_bitstrm);
2626 AEV_TRACE("end_of_slice_flag", end_of_slice_flag, ps_codec->s_parse.s_cabac.u4_range);
2638 if(1 == ps_codec->s_parse.i4_ctb_x)
2640 WORD32 size = sizeof(ps_codec->s_parse.s_cabac.au1_ctxt_models);
2641 memcpy(&ps_codec->s_parse.s_cabac.au1_ctxt_models_sync, &ps_codec->s_parse.s_cabac.au1_ctxt_models, size);
2646 if((ps_codec->s_parse.i4_ctb_tile_x + 1) == (ps_tile->u2_wd))
2649 if((ps_codec->s_parse.i4_ctb_tile_y + 1) == ps_tile->u2_ht)
2657 end_of_sub_stream_one_bit = ihevcd_cabac_decode_terminate(&ps_codec->s_parse.s_cabac, &ps_codec->s_parse.s_bitstrm);
2658 AEV_TRACE("end_of_sub_stream_one_bit", end_of_sub_stream_one_bit, ps_codec->s_parse.s_cabac.u4_range);
2662 if(ps_codec->s_parse.s_bitstrm.u4_bit_ofst % 8)
2663 ihevcd_bits_flush_to_byte_boundary(&ps_codec->s_parse.s_bitstrm);
2671 ctb_addr = ps_codec->s_parse.i4_ctb_y * num_ctb_in_row + ps_codec->s_parse.i4_ctb_x;
2678 if((ps_tile->u2_wd == (ps_codec->s_parse.i4_ctb_tile_x + 1)) && (ps_tile->u2_wd != ps_sps->i2_pic_wd_in_ctb))
2680 ctb_indx = (ps_sps->i2_pic_wd_in_ctb * (ps_codec->s_parse.i4_ctb_tile_y + 1 + ps_tile->u1_pos_y)) + ps_tile->u1_pos_x; //idx is the beginning of next row in current tile.
2681 if(ps_tile->u2_ht == (ps_codec->s_parse.i4_ctb_tile_y + 1))
2690 tile_t *ps_next_tile = ps_codec->s_parse.ps_tile + 1;
2696 ps_codec->s_parse.pu4_pic_pu_idx[ctb_indx] = ps_codec->s_parse.i4_pic_pu_idx;
2697 ps_codec->s_parse.i4_next_pu_ctb_cnt = ctb_indx;
2699 ps_codec->s_parse.pu1_pu_map += num_min4x4_in_ctb;
2708 if((ps_tile->u2_wd == (ps_codec->s_parse.i4_ctb_tile_x + 1)) && (ps_tile->u2_wd != ps_sps->i2_pic_wd_in_ctb))
2710 ctb_indx = (ps_sps->i2_pic_wd_in_ctb * (ps_codec->s_parse.i4_ctb_tile_y + 1 + ps_tile->u1_pos_y)) + ps_tile->u1_pos_x; //idx is the beginning of next row in current tile.
2711 if(ps_tile->u2_ht == (ps_codec->s_parse.i4_ctb_tile_y + 1))
2721 tile_t *ps_next_tile = ps_codec->s_parse.ps_tile + 1;
2726 ps_codec->s_parse.i4_next_tu_ctb_cnt = ctb_indx;
2727 ps_codec->s_parse.pu4_pic_tu_idx[ctb_indx] = ps_codec->s_parse.i4_pic_tu_idx;
2732 if((ps_tile->u2_wd == (ps_codec->s_parse.i4_ctb_tile_x + 1)) && (ps_tile->u2_wd != ps_sps->i2_pic_wd_in_ctb))
2734 ctb_indx = (ps_sps->i2_pic_wd_in_ctb * (ps_codec->s_parse.i4_ctb_tile_y + 1 + ps_tile->u1_pos_y)) + ps_tile->u1_pos_x; //idx is the beginning of next row in current tile.
2735 if(ps_tile->u2_ht == (ps_codec->s_parse.i4_ctb_tile_y + 1))
2744 tile_t *ps_next_tile = ps_codec->s_parse.ps_tile + 1;
2749 ps_codec->s_parse.i4_next_tu_ctb_cnt = ctb_indx;
2750 ps_codec->s_parse.pu4_pic_tu_idx[ctb_indx] = ps_codec->s_parse.i4_pic_tu_idx;
2752 ps_codec->s_parse.pu1_tu_map += num_min4x4_in_ctb;
2760 bs_ctxt_t *ps_bs_ctxt = &ps_codec->s_parse.s_bs_ctxt;
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;
2774 pu1_qp = ps_bs_ctxt->pu1_pic_qp + ((ps_codec->s_parse.i4_ctb_x + ps_codec->s_parse.i4_ctb_y * qp_strd) << (log2_ctb_size - 3));
2778 next_ctb_idx = ps_codec->s_parse.i4_next_tu_ctb_cnt;
2781 i4_ctb_tu_cnt = ps_codec->s_parse.pu4_pic_tu_idx[next_ctb_idx] -
2782 ps_codec->s_parse.pu4_pic_tu_idx[cur_ctb_idx % RESET_TU_BUF_NCTB];
2784 cur_tu_idx = ps_codec->s_parse.pu4_pic_tu_idx[cur_ctb_idx % RESET_TU_BUF_NCTB];
2788 i4_ctb_tu_cnt = ps_codec->s_parse.pu4_pic_tu_idx[next_ctb_idx] -
2789 ps_codec->s_parse.pu4_pic_tu_idx[cur_ctb_idx];
2791 cur_tu_idx = ps_codec->s_parse.pu4_pic_tu_idx[cur_ctb_idx];
2794 ps_tu = &ps_codec->s_parse.ps_pic_tu[cur_tu_idx];
2857 if((0 == ps_codec->s_parse.i4_ctb_y) || (0 == ps_codec->s_parse.i4_ctb_tile_y))
2864 if((0 == ps_codec->s_parse.i4_ctb_x) || (0 == ps_codec->s_parse.i4_ctb_tile_x))
2868 if((0 == ps_codec->s_parse.i4_ctb_slice_y) || (0 == ps_codec->s_parse.i4_ctb_tile_y))
2871 if((i2_wd_in_ctb - 1) != ps_codec->s_parse.i4_ctb_slice_x) //TODO: For tile, not implemented
2878 else if(ps_codec->s_parse.i4_ctb_x > 0)
2880 if((0 == ps_codec->s_parse.i4_ctb_slice_y) || (0 == ps_codec->s_parse.i4_ctb_tile_y))
2884 if(0 == ps_codec->s_parse.i4_ctb_slice_x)
2888 if((i2_wd_in_ctb - 1) != ps_codec->s_parse.i4_ctb_slice_x)
2893 else if((1 == ps_codec->s_parse.i4_ctb_slice_y) && (0 == ps_codec->s_parse.i4_ctb_slice_x))
2899 if(((ps_sps->i2_pic_wd_in_ctb - 1) == ps_codec->s_parse.i4_ctb_x) || ((ps_tile->u2_wd - 1) == ps_codec->s_parse.i4_ctb_tile_x))
2917 cur_ctb_idx = ps_codec->s_parse.i4_ctb_x
2918 + ps_codec->s_parse.i4_ctb_y * (ps_sps->i2_pic_wd_in_ctb);
2919 next_ctb_idx = ps_codec->s_parse.i4_next_pu_ctb_cnt;
2920 i4_ctb_pu_cnt = ps_codec->s_parse.pu4_pic_pu_idx[next_ctb_idx]
2921 - ps_codec->s_parse.pu4_pic_pu_idx[cur_ctb_idx];
2923 cur_pu_idx = ps_codec->s_parse.pu4_pic_pu_idx[cur_ctb_idx];
2926 + (ps_codec->s_parse.i4_ctb_x * ctb_size / MIN_PU_SIZE);
2935 s_mv_ctxt.i4_ctb_x = ps_codec->s_parse.i4_ctb_x;
2936 s_mv_ctxt.i4_ctb_y = ps_codec->s_parse.i4_ctb_y;
2937 s_mv_ctxt.ps_pu = &ps_codec->s_parse.ps_pic_pu[cur_pu_idx];
2938 s_mv_ctxt.ps_pic_pu = ps_codec->s_parse.ps_pic_pu;
2941 s_mv_ctxt.pu4_pic_pu_idx = ps_codec->s_parse.pu4_pic_pu_idx;
2942 s_mv_ctxt.pu1_pic_pu_map = ps_codec->s_parse.pu1_pic_pu_map;
2958 UWORD8 *pu1_pic_pu_map_ctb = ps_codec->s_parse.pu1_pic_pu_map +
2959 (ps_codec->s_parse.i4_ctb_x + ps_codec->s_parse.i4_ctb_y * ps_sps->i2_pic_wd_in_ctb) * num_minpu_in_ctb;
2983 cur_ctb_idx = ps_codec->s_parse.i4_ctb_x
2984 + ps_codec->s_parse.i4_ctb_y * (ps_sps->i2_pic_wd_in_ctb);
2985 next_ctb_idx = ps_codec->s_parse.i4_next_pu_ctb_cnt;
2986 num_pu_per_ctb = ps_codec->s_parse.pu4_pic_pu_idx[next_ctb_idx]
2987 - ps_codec->s_parse.pu4_pic_pu_idx[cur_ctb_idx];
2988 ctb_start_pu_idx = ps_codec->s_parse.pu4_pic_pu_idx[cur_ctb_idx];
2989 ps_pu = &ps_codec->s_parse.ps_pic_pu[ctb_start_pu_idx];
3010 - (ps_codec->s_parse.i4_ctb_y << ps_sps->i1_log2_ctb_size);
3015 ps_proc->u4_ctb_top_left_pu_idx = ps_proc->pu4_pic_pu_idx_top[(ps_codec->s_parse.i4_ctb_x * ctb_size / MIN_PU_SIZE) + ctb_size / MIN_PU_SIZE - 1];
3024 ps_proc->pu4_pic_pu_idx_top[(ps_codec->s_parse.i4_ctb_x * ctb_size / MIN_PU_SIZE) + i] =
3050 cur_ctb_idx = ps_codec->s_parse.i4_ctb_x
3051 + ps_codec->s_parse.i4_ctb_y * (ps_sps->i2_pic_wd_in_ctb);
3053 cur_pu_idx = ps_codec->s_parse.pu4_pic_pu_idx[cur_ctb_idx];
3054 next_ctb_idx = ps_codec->s_parse.i4_next_tu_ctb_cnt;
3057 i4_ctb_tu_cnt = ps_codec->s_parse.pu4_pic_tu_idx[next_ctb_idx] -
3058 ps_codec->s_parse.pu4_pic_tu_idx[cur_ctb_idx % RESET_TU_BUF_NCTB];
3060 cur_tu_idx = ps_codec->s_parse.pu4_pic_tu_idx[cur_ctb_idx % RESET_TU_BUF_NCTB];
3064 i4_ctb_tu_cnt = ps_codec->s_parse.pu4_pic_tu_idx[next_ctb_idx] -
3065 ps_codec->s_parse.pu4_pic_tu_idx[cur_ctb_idx];
3067 cur_tu_idx = ps_codec->s_parse.pu4_pic_tu_idx[cur_ctb_idx];
3070 ps_codec->s_parse.s_bs_ctxt.ps_pps = ps_codec->s_parse.ps_pps;
3071 ps_codec->s_parse.s_bs_ctxt.ps_sps = ps_codec->s_parse.ps_sps;
3072 ps_codec->s_parse.s_bs_ctxt.ps_codec = ps_codec;
3073 ps_codec->s_parse.s_bs_ctxt.i4_ctb_tu_cnt = i4_ctb_tu_cnt;
3074 ps_codec->s_parse.s_bs_ctxt.i4_ctb_x = ps_codec->s_parse.i4_ctb_x;
3075 ps_codec->s_parse.s_bs_ctxt.i4_ctb_y = ps_codec->s_parse.i4_ctb_y;
3076 ps_codec->s_parse.s_bs_ctxt.i4_ctb_tile_x = ps_codec->s_parse.i4_ctb_tile_x;
3077 ps_codec->s_parse.s_bs_ctxt.i4_ctb_tile_y = ps_codec->s_parse.i4_ctb_tile_y;
3078 ps_codec->s_parse.s_bs_ctxt.i4_ctb_slice_x = ps_codec->s_parse.i4_ctb_slice_x;
3079 ps_codec->s_parse.s_bs_ctxt.i4_ctb_slice_y = ps_codec->s_parse.i4_ctb_slice_y;
3080 ps_codec->s_parse.s_bs_ctxt.ps_tu = &ps_codec->s_parse.ps_pic_tu[cur_tu_idx];
3081 ps_codec->s_parse.s_bs_ctxt.ps_pu = &ps_codec->s_parse.ps_pic_pu[cur_pu_idx];
3082 ps_codec->s_parse.s_bs_ctxt.pu4_pic_pu_idx_map = ps_proc->pu4_pic_pu_idx_map;
3083 ps_codec->s_parse.s_bs_ctxt.i4_next_pu_ctb_cnt = ps_codec->s_parse.i4_next_pu_ctb_cnt;
3084 ps_codec->s_parse.s_bs_ctxt.i4_next_tu_ctb_cnt = ps_codec->s_parse.i4_next_tu_ctb_cnt;
3085 ps_codec->s_parse.s_bs_ctxt.pu1_slice_idx = ps_codec->s_parse.pu1_slice_idx;
3086 ps_codec->s_parse.s_bs_ctxt.ps_slice_hdr = ps_codec->s_parse.ps_slice_hdr;
3087 ps_codec->s_parse.s_bs_ctxt.ps_tile = ps_codec->s_parse.ps_tile;
3091 ihevcd_ctb_boundary_strength_islice(&ps_codec->s_parse.s_bs_ctxt);
3095 ihevcd_ctb_boundary_strength_pbslice(&ps_codec->s_parse.s_bs_ctxt);
3104 UWORD32 *pu4_vert_bs = (UWORD32 *)((UWORD8 *)ps_codec->s_parse.s_bs_ctxt.pu4_pic_vert_bs +
3105 ps_codec->s_parse.i4_ctb_x * (ctb_size * ctb_size / 8 / 16) +
3106 ps_codec->s_parse.i4_ctb_y * bs_strd);
3107 UWORD32 *pu4_horz_bs = (UWORD32 *)((UWORD8 *)ps_codec->s_parse.s_bs_ctxt.pu4_pic_horz_bs +
3108 ps_codec->s_parse.i4_ctb_x * (ctb_size * ctb_size / 8 / 16) +
3109 ps_codec->s_parse.i4_ctb_y * bs_strd);
3122 sps_t *ps_sps = ps_codec->s_parse.ps_sps;
3125 idx = (ps_codec->s_parse.i4_ctb_x);
3126 idx += ((ps_codec->s_parse.i4_ctb_y) * ps_sps->i2_pic_wd_in_ctb);
3132 ps_codec->s_parse.i4_ctb_tile_x++;
3133 ps_codec->s_parse.i4_ctb_x++;
3134 ps_codec->s_parse.i4_ctb_slice_x++;
3148 if(ps_codec->s_parse.i4_ctb_slice_x == (ps_tile->u1_pos_x + ps_tile->u2_wd))
3151 ps_codec->s_parse.i4_ctb_slice_y++;
3152 ps_codec->s_parse.i4_ctb_slice_x = ps_tile->u1_pos_x; //todo:Check
3156 else if(ps_codec->s_parse.i4_ctb_slice_x == (ps_tile->u2_wd))
3158 ps_codec->s_parse.i4_ctb_slice_y++;
3159 ps_codec->s_parse.i4_ctb_slice_x = 0;
3164 if(ps_codec->s_parse.i4_ctb_slice_x == ps_tile->u2_wd)
3167 ps_codec->s_parse.i4_ctb_slice_y++;
3168 ps_codec->s_parse.i4_ctb_slice_x = 0;
3173 if(ps_codec->s_parse.i4_ctb_tile_x == (ps_tile->u2_wd))
3176 ps_codec->s_parse.i4_ctb_tile_x = 0;
3177 ps_codec->s_parse.i4_ctb_x = ps_tile->u1_pos_x;
3179 ps_codec->s_parse.i4_ctb_tile_y++;
3180 ps_codec->s_parse.i4_ctb_y++;
3182 if(ps_codec->s_parse.i4_ctb_tile_y == (ps_tile->u2_ht))
3185 ps_codec->s_parse.i4_ctb_tile_y = 0;
3186 ps_codec->s_parse.i4_ctb_tile_x = 0;
3187 ps_codec->s_parse.ps_tile++;
3193 ps_codec->s_parse.i4_ctb_x = 0;
3194 ps_codec->s_parse.i4_ctb_y = ps_sps->i2_pic_ht_in_ctb;
3199 ps_tile = ps_codec->s_parse.ps_tile;
3200 ps_codec->s_parse.i4_ctb_x = ps_tile->u1_pos_x;
3201 ps_codec->s_parse.i4_ctb_y = ps_tile->u1_pos_y;
3202 ps_codec->s_parse.i4_ctb_tile_y = 0;
3203 ps_codec->s_parse.i4_ctb_tile_x = 0;
3204 ps_codec->s_parse.i4_ctb_slice_x = ps_tile->u1_pos_x;
3205 ps_codec->s_parse.i4_ctb_slice_y = ps_tile->u1_pos_y;
3212 ps_codec->s_parse.i4_next_ctb_indx = ps_codec->s_parse.i4_ctb_x +
3213 ps_codec->s_parse.i4_ctb_y * ps_sps->i2_pic_wd_in_ctb;
3223 if(ps_codec->s_parse.i4_next_ctb_indx == next_slice_addr)
3230 if((1 == ps_codec->i4_num_cores) && (ps_codec->s_parse.i4_ctb_tile_x == 0))
3241 if((UWORD8 *)ps_codec->s_parse.s_bitstrm.pu1_buf_max + BITSTRM_OFF_THRS <
3242 ((UWORD8 *)ps_codec->s_parse.s_bitstrm.pu4_buf + (ps_codec->s_parse.s_bitstrm.u4_bit_ofst / 8)))
3262 parse_slice_idx = ps_codec->s_parse.i4_cur_slice_idx;
3269 ps_codec->s_parse.i4_cur_slice_idx = parse_slice_idx;
3286 ps_codec->s_parse.i4_cur_slice_idx = parse_slice_idx;
3326 ps_codec->s_parse.s_deblk_ctxt.ps_pps = ps_codec->s_parse.ps_pps;
3327 ps_codec->s_parse.s_deblk_ctxt.ps_sps = ps_codec->s_parse.ps_sps;
3328 ps_codec->s_parse.s_deblk_ctxt.ps_codec = ps_codec;
3329 ps_codec->s_parse.s_deblk_ctxt.ps_slice_hdr = ps_codec->s_parse.ps_slice_hdr;
3330 ps_codec->s_parse.s_deblk_ctxt.is_chroma_yuv420sp_vu = (ps_codec->e_ref_chroma_fmt == IV_YUV_420SP_VU);
3332 ps_codec->s_parse.s_sao_ctxt.ps_pps = ps_codec->s_parse.ps_pps;
3333 ps_codec->s_parse.s_sao_ctxt.ps_sps = ps_codec->s_parse.ps_sps;
3334 ps_codec->s_parse.s_sao_ctxt.ps_codec = ps_codec;
3335 ps_codec->s_parse.s_sao_ctxt.ps_slice_hdr = ps_codec->s_parse.ps_slice_hdr;
3337 ihevcd_ilf_pad_frame(&ps_codec->s_parse.s_deblk_ctxt, &ps_codec->s_parse.s_sao_ctxt);
3341 ps_codec->s_parse.i4_end_of_frame = 1;