• Home
  • Raw
  • Download

Lines Matching refs:ps_proc

93                                process_ctxt_t *ps_proc,
109 void ihevcd_proc_map_check(process_ctxt_t *ps_proc, proc_type_t proc_type, WORD32 nctb) in ihevcd_proc_map_check() argument
111 tile_t *ps_tile = ps_proc->ps_tile; in ihevcd_proc_map_check()
112 sps_t *ps_sps = ps_proc->ps_sps; in ihevcd_proc_map_check()
113 pps_t *ps_pps = ps_proc->ps_pps; in ihevcd_proc_map_check()
114 codec_t *ps_codec = ps_proc->ps_codec; in ihevcd_proc_map_check()
120 if(ps_proc->i4_check_proc_status) in ihevcd_proc_map_check()
134 if(ps_proc->i4_ctb_y > 0) in ihevcd_proc_map_check()
136 x_pos = (ps_proc->i4_ctb_tile_x + nctb); in ihevcd_proc_map_check()
142 idx += ((ps_proc->i4_ctb_y - 1) in ihevcd_proc_map_check()
151 ps_pps = ps_proc->ps_pps; in ihevcd_proc_map_check()
155 if((ps_proc->i4_ctb_x > 0) && ((0 != status))) in ihevcd_proc_map_check()
157 x_pos = ps_tile->u1_pos_x + ps_proc->i4_ctb_tile_x - 1; in ihevcd_proc_map_check()
158 idx = x_pos + (ps_proc->i4_ctb_y * ps_sps->i2_pic_wd_in_ctb); in ihevcd_proc_map_check()
164 if((ps_proc->i4_ctb_x > 0) && (0 != status) && (ps_proc->i4_ctb_y > 0)) in ihevcd_proc_map_check()
166 x_pos = ps_tile->u1_pos_x + ps_proc->i4_ctb_tile_x - 1; in ihevcd_proc_map_check()
167 idx = x_pos + ((ps_proc->i4_ctb_y - 1) * ps_sps->i2_pic_wd_in_ctb); in ihevcd_proc_map_check()
196 void ihevcd_proc_map_update(process_ctxt_t *ps_proc, proc_type_t proc_type, WORD32 nctb) in ihevcd_proc_map_update() argument
198 codec_t *ps_codec = ps_proc->ps_codec; in ihevcd_proc_map_update()
204 if(ps_proc->i4_check_proc_status) in ihevcd_proc_map_update()
209 sps_t *ps_sps = ps_proc->ps_sps; in ihevcd_proc_map_update()
211 idx = (ps_proc->i4_ctb_x + i); in ihevcd_proc_map_update()
212 idx += ((ps_proc->i4_ctb_y) * ps_sps->i2_pic_wd_in_ctb); in ihevcd_proc_map_update()
220 void ihevcd_slice_hdr_update(process_ctxt_t *ps_proc) in ihevcd_slice_hdr_update() argument
225 if(!((ps_proc->i4_ctb_x == 0) && (ps_proc->i4_ctb_y == 0))) in ihevcd_slice_hdr_update()
227 …slice_header_t *ps_slice_hdr_next = ps_proc->ps_codec->ps_slice_hdr_base + ((ps_proc->i4_cur_slice… in ihevcd_slice_hdr_update()
229 if((ps_slice_hdr_next->i2_ctb_x == ps_proc->i4_ctb_x) in ihevcd_slice_hdr_update()
230 && (ps_slice_hdr_next->i2_ctb_y == ps_proc->i4_ctb_y)) in ihevcd_slice_hdr_update()
234 ps_proc->i4_ctb_slice_x = 0; in ihevcd_slice_hdr_update()
235 ps_proc->i4_ctb_slice_y = 0; in ihevcd_slice_hdr_update()
238 ps_proc->i4_cur_slice_idx++; in ihevcd_slice_hdr_update()
239 ps_proc->ps_slice_hdr = ps_slice_hdr_next; in ihevcd_slice_hdr_update()
245 void ihevcd_ctb_pos_update(process_ctxt_t *ps_proc, WORD32 nctb) in ihevcd_ctb_pos_update() argument
248 slice_header_t *ps_slice_hdr = ps_proc->ps_slice_hdr; in ihevcd_ctb_pos_update()
249 tile_t *ps_tile = ps_proc->ps_tile; in ihevcd_ctb_pos_update()
250 sps_t *ps_sps = ps_proc->ps_sps; in ihevcd_ctb_pos_update()
253 ps_proc->i4_ctb_tile_x += nctb; in ihevcd_ctb_pos_update()
254 ps_proc->i4_ctb_x += nctb; in ihevcd_ctb_pos_update()
256 ps_proc->i4_ctb_slice_x += nctb; in ihevcd_ctb_pos_update()
258 if(ps_proc->ps_pps->i1_tiles_enabled_flag) in ihevcd_ctb_pos_update()
273 if(ps_proc->i4_ctb_x > ps_slice_hdr->i2_ctb_x) in ihevcd_ctb_pos_update()
275 if(ps_proc->i4_ctb_slice_x >= (ps_tile->u2_wd + ps_tile->u1_pos_x)) in ihevcd_ctb_pos_update()
277 ps_proc->i4_ctb_slice_y++; in ihevcd_ctb_pos_update()
278 ps_proc->i4_ctb_slice_x = ps_proc->i4_ctb_slice_x in ihevcd_ctb_pos_update()
285 if(ps_proc->i4_ctb_slice_x >= (temp_stride + ps_tile->u2_wd + ps_tile->u1_pos_x)) in ihevcd_ctb_pos_update()
287 ps_proc->i4_ctb_slice_y++; in ihevcd_ctb_pos_update()
288 ps_proc->i4_ctb_slice_x = ps_proc->i4_ctb_slice_x in ihevcd_ctb_pos_update()
294 else if(ps_proc->i4_ctb_slice_x >= (ps_tile->u2_wd)) in ihevcd_ctb_pos_update()
297 ps_proc->i4_ctb_slice_y++; in ihevcd_ctb_pos_update()
298 ps_proc->i4_ctb_slice_x = 0; in ihevcd_ctb_pos_update()
303 if(ps_proc->i4_ctb_slice_x >= ps_tile->u2_wd) in ihevcd_ctb_pos_update()
305 ps_proc->i4_ctb_slice_y++; in ihevcd_ctb_pos_update()
306 ps_proc->i4_ctb_slice_x = ps_proc->i4_ctb_slice_x in ihevcd_ctb_pos_update()
312 void ihevcd_ctb_avail_update(process_ctxt_t *ps_proc) in ihevcd_ctb_avail_update() argument
314 slice_header_t *ps_slice_hdr = ps_proc->ps_slice_hdr; in ihevcd_ctb_avail_update()
315 sps_t *ps_sps = ps_proc->ps_sps; in ihevcd_ctb_avail_update()
317 tile_t *ps_tile = ps_proc->ps_tile; in ihevcd_ctb_avail_update()
354 cur_ctb_idx = ps_proc->i4_ctb_x in ihevcd_ctb_avail_update()
355 + ps_proc->i4_ctb_y * (ps_sps->i2_pic_wd_in_ctb); in ihevcd_ctb_avail_update()
359 ps_proc->u1_top_ctb_avail = 1; in ihevcd_ctb_avail_update()
360 ps_proc->u1_left_ctb_avail = 1; in ihevcd_ctb_avail_update()
361 ps_proc->u1_top_lt_ctb_avail = 1; in ihevcd_ctb_avail_update()
362 ps_proc->u1_top_rt_ctb_avail = 1; in ihevcd_ctb_avail_update()
365 if((0 == ps_proc->i4_ctb_y) || (0 == ps_proc->i4_ctb_tile_y)) in ihevcd_ctb_avail_update()
367 ps_proc->u1_top_ctb_avail = 0; in ihevcd_ctb_avail_update()
368 ps_proc->u1_top_lt_ctb_avail = 0; in ihevcd_ctb_avail_update()
369 ps_proc->u1_top_rt_ctb_avail = 0; in ihevcd_ctb_avail_update()
372 if((0 == ps_proc->i4_ctb_x) || (0 == ps_proc->i4_ctb_tile_x)) in ihevcd_ctb_avail_update()
374 ps_proc->u1_left_ctb_avail = 0; in ihevcd_ctb_avail_update()
375 ps_proc->u1_top_lt_ctb_avail = 0; in ihevcd_ctb_avail_update()
376 if((0 == ps_proc->i4_ctb_slice_y) || (0 == ps_proc->i4_ctb_tile_y)) in ihevcd_ctb_avail_update()
378 ps_proc->u1_top_ctb_avail = 0; in ihevcd_ctb_avail_update()
379 if((i2_wd_in_ctb - 1) != ps_proc->i4_ctb_slice_x) in ihevcd_ctb_avail_update()
381 ps_proc->u1_top_rt_ctb_avail = 0; in ihevcd_ctb_avail_update()
386 else if(ps_proc->i4_ctb_x > 0) in ihevcd_ctb_avail_update()
388 if((0 == ps_proc->i4_ctb_slice_y) || (0 == ps_proc->i4_ctb_tile_y)) in ihevcd_ctb_avail_update()
390 ps_proc->u1_top_ctb_avail = 0; in ihevcd_ctb_avail_update()
391 ps_proc->u1_top_lt_ctb_avail = 0; in ihevcd_ctb_avail_update()
392 if(0 == ps_proc->i4_ctb_slice_x) in ihevcd_ctb_avail_update()
394 ps_proc->u1_left_ctb_avail = 0; in ihevcd_ctb_avail_update()
396 if((i2_wd_in_ctb - 1) != ps_proc->i4_ctb_slice_x) in ihevcd_ctb_avail_update()
398 ps_proc->u1_top_rt_ctb_avail = 0; in ihevcd_ctb_avail_update()
401 else if((1 == ps_proc->i4_ctb_slice_y) && (0 == ps_proc->i4_ctb_slice_x)) in ihevcd_ctb_avail_update()
403 ps_proc->u1_top_lt_ctb_avail = 0; in ihevcd_ctb_avail_update()
407 …if((ps_proc->i4_ctb_x == (ps_sps->i2_pic_wd_in_ctb - 1)) || ((ps_tile->u2_wd - 1) == ps_proc->i4_c… in ihevcd_ctb_avail_update()
409 ps_proc->u1_top_rt_ctb_avail = 0; in ihevcd_ctb_avail_update()
417 if(ps_tile->u2_wd == (ps_proc->i4_ctb_tile_x + 1)) in ihevcd_ctb_avail_update()
419 if((ps_proc->i4_ctb_tile_y + 1) == ps_tile->u2_ht) in ihevcd_ctb_avail_update()
422 …if(((ps_proc->i4_ctb_tile_y + 1 + ps_tile->u1_pos_y) == ps_sps->i2_pic_ht_in_ctb) && ((ps_proc->i4… in ihevcd_ctb_avail_update()
428 tile_t *ps_tile_next = ps_proc->ps_tile + 1; in ihevcd_ctb_avail_update()
434 …next_ctb_idx = ((ps_tile->u1_pos_y + ps_proc->i4_ctb_tile_y + 1) * ps_sps->i2_pic_wd_in_ctb) + ps_… in ihevcd_ctb_avail_update()
437 ps_proc->i4_next_pu_ctb_cnt = next_ctb_idx; in ihevcd_ctb_avail_update()
438 ps_proc->i4_ctb_pu_cnt = in ihevcd_ctb_avail_update()
439 ps_proc->pu4_pic_pu_idx[next_ctb_idx] in ihevcd_ctb_avail_update()
440 - ps_proc->pu4_pic_pu_idx[cur_ctb_idx]; in ihevcd_ctb_avail_update()
441 cur_pu_idx = ps_proc->pu4_pic_pu_idx[cur_ctb_idx]; in ihevcd_ctb_avail_update()
442 ps_proc->i4_ctb_start_pu_idx = cur_pu_idx; in ihevcd_ctb_avail_update()
443 ps_proc->ps_pu = &ps_proc->ps_pic_pu[cur_pu_idx]; in ihevcd_ctb_avail_update()
447 void ihevcd_update_ctb_tu_cnt(process_ctxt_t *ps_proc) in ihevcd_update_ctb_tu_cnt() argument
449 sps_t *ps_sps = ps_proc->ps_sps; in ihevcd_update_ctb_tu_cnt()
450 codec_t *ps_codec = ps_proc->ps_codec; in ihevcd_update_ctb_tu_cnt()
453 cur_ctb_idx = ps_proc->i4_ctb_x in ihevcd_update_ctb_tu_cnt()
454 + ps_proc->i4_ctb_y * (ps_sps->i2_pic_wd_in_ctb); in ihevcd_update_ctb_tu_cnt()
459 ps_tile = ps_proc->ps_tile; in ihevcd_update_ctb_tu_cnt()
465 if(ps_tile->u2_wd == (ps_proc->i4_ctb_tile_x + 1)) in ihevcd_update_ctb_tu_cnt()
467 if((ps_proc->i4_ctb_tile_y + 1) == ps_tile->u2_ht) in ihevcd_update_ctb_tu_cnt()
470 …if(((ps_proc->i4_ctb_tile_y + 1 + ps_tile->u1_pos_y) == ps_sps->i2_pic_ht_in_ctb) && ((ps_proc->i4… in ihevcd_update_ctb_tu_cnt()
476 tile_t *ps_tile_next = ps_proc->ps_tile + 1; in ihevcd_update_ctb_tu_cnt()
482 …next_ctb_tu_idx = ((ps_tile->u1_pos_y + ps_proc->i4_ctb_tile_y + 1) * ps_sps->i2_pic_wd_in_ctb) + … in ihevcd_update_ctb_tu_cnt()
485 ps_proc->i4_next_tu_ctb_cnt = next_ctb_tu_idx; in ihevcd_update_ctb_tu_cnt()
486ps_proc->i4_ctb_tu_cnt = ps_proc->pu4_pic_tu_idx[next_ctb_tu_idx] - ps_proc->pu4_pic_tu_idx[cur_ct… in ihevcd_update_ctb_tu_cnt()
491 if(ps_tile->u2_wd == (ps_proc->i4_ctb_tile_x + 1)) in ihevcd_update_ctb_tu_cnt()
493 if((ps_proc->i4_ctb_tile_y + 1) == ps_tile->u2_ht) in ihevcd_update_ctb_tu_cnt()
496 …if(((ps_proc->i4_ctb_tile_y + 1 + ps_tile->u1_pos_y) == ps_sps->i2_pic_ht_in_ctb) && ((ps_proc->i4… in ihevcd_update_ctb_tu_cnt()
502 tile_t *ps_tile_next = ps_proc->ps_tile + 1; in ihevcd_update_ctb_tu_cnt()
508 …next_ctb_tu_idx = ((ps_tile->u1_pos_y + ps_proc->i4_ctb_tile_y + 1) * ps_sps->i2_pic_wd_in_ctb) + … in ihevcd_update_ctb_tu_cnt()
511 ps_proc->i4_next_tu_ctb_cnt = next_ctb_tu_idx; in ihevcd_update_ctb_tu_cnt()
512 ps_proc->i4_ctb_tu_cnt = ps_proc->pu4_pic_tu_idx[next_ctb_tu_idx] - in ihevcd_update_ctb_tu_cnt()
513 ps_proc->pu4_pic_tu_idx[cur_ctb_idx]; in ihevcd_update_ctb_tu_cnt()
518 IHEVCD_ERROR_T ihevcd_process(process_ctxt_t *ps_proc) in ihevcd_process() argument
522 sps_t *ps_sps = ps_proc->ps_sps; in ihevcd_process()
541 ps_codec = ps_proc->ps_codec; in ihevcd_process()
544 nctb = MIN(ps_codec->i4_proc_nctb, ps_proc->i4_ctb_cnt); in ihevcd_process()
545 nctb = MIN(nctb, (ps_proc->ps_tile->u2_wd - ps_proc->i4_ctb_tile_x)); in ihevcd_process()
547 if(ps_proc->i4_cur_slice_idx > (MAX_SLICE_HDR_CNT - 2 * ps_sps->i2_pic_wd_in_ctb)) in ihevcd_process()
553 num_ctb = ps_proc->i4_nctb; in ihevcd_process()
555 nxt_ctb_slice_y = ps_proc->i4_ctb_slice_y; in ihevcd_process()
556 nxt_ctb_slice_x = ps_proc->i4_ctb_slice_x; in ihevcd_process()
557 pu1_pu_map_nxt = ps_proc->pu1_pu_map; in ihevcd_process()
558 ps_tu_nxt = ps_proc->ps_tu; in ihevcd_process()
560 while(ps_proc->i4_ctb_cnt) in ihevcd_process()
562 ps_proc->i4_ctb_slice_y = nxt_ctb_slice_y; in ihevcd_process()
563 ps_proc->i4_ctb_slice_x = nxt_ctb_slice_x; in ihevcd_process()
564 ps_proc->pu1_pu_map = pu1_pu_map_nxt; in ihevcd_process()
565 ps_proc->ps_tu = ps_tu_nxt; in ihevcd_process()
567 cur_ctb_tile_x = ps_proc->i4_ctb_tile_x; in ihevcd_process()
568 cur_ctb_tile_y = ps_proc->i4_ctb_tile_y; in ihevcd_process()
569 cur_ctb_slice_x = ps_proc->i4_ctb_slice_x; in ihevcd_process()
570 cur_ctb_slice_y = ps_proc->i4_ctb_slice_y; in ihevcd_process()
571 cur_slice_idx = ps_proc->i4_cur_slice_idx; in ihevcd_process()
572 ps_tu_cur = ps_proc->ps_tu; in ihevcd_process()
573 pu1_pu_map_cur = ps_proc->pu1_pu_map; in ihevcd_process()
576 if(ps_proc->i4_ctb_cnt < num_ctb) in ihevcd_process()
578 num_ctb = ps_proc->i4_ctb_cnt; in ihevcd_process()
585 tile_t *ps_tile = ps_proc->ps_tile; in ihevcd_process()
592 if(ps_proc->i4_check_parse_status || ps_proc->i4_check_proc_status) in ihevcd_process()
601 if(ps_proc->i4_check_parse_status) in ihevcd_process()
603 idx = (ps_proc->i4_ctb_x + nctb - 1); in ihevcd_process()
604 idx += (ps_proc->i4_ctb_y * ps_sps->i2_pic_wd_in_ctb); in ihevcd_process()
630 ihevcd_proc_map_check(ps_proc, proc_type, nctb); in ihevcd_process()
632 ihevcd_slice_hdr_update(ps_proc); in ihevcd_process()
633 ps_slice_hdr = ps_proc->ps_slice_hdr; in ihevcd_process()
648 ihevcd_ctb_avail_update(ps_proc); in ihevcd_process()
651 … au1_pic_avail_ctb_flags[ps_proc->i4_ctb_x + ps_proc->i4_ctb_y * ps_sps->i2_pic_wd_in_ctb] = in ihevcd_process()
652 …((ps_proc->u1_top_ctb_avail << 3) | (ps_proc->u1_left_ctb_avail << 2) | (ps_proc->u1_top_lt_ctb_av… in ihevcd_process()
653 … au4_pic_ctb_slice_xy[ps_proc->i4_ctb_x + ps_proc->i4_ctb_y * ps_sps->i2_pic_wd_in_ctb] = in ihevcd_process()
654 … (((UWORD16)ps_proc->i4_ctb_slice_x << 16) | ((UWORD16)ps_proc->i4_ctb_slice_y << 16)); in ihevcd_process()
665 pu4_ctb_top_pu_idx = ps_proc->pu4_pic_pu_idx_top in ihevcd_process()
666 + (ps_proc->i4_ctb_x * ctb_size / MIN_PU_SIZE); in ihevcd_process()
667 pu4_ctb_left_pu_idx = ps_proc->pu4_pic_pu_idx_left; in ihevcd_process()
668 pu4_ctb_top_left_pu_idx = &ps_proc->u4_ctb_top_left_pu_idx; in ihevcd_process()
673 s_mv_ctxt.ps_pps = ps_proc->ps_pps; in ihevcd_process()
674 s_mv_ctxt.ps_sps = ps_proc->ps_sps; in ihevcd_process()
675 s_mv_ctxt.ps_slice_hdr = ps_proc->ps_slice_hdr; in ihevcd_process()
676 s_mv_ctxt.i4_ctb_x = ps_proc->i4_ctb_x; in ihevcd_process()
677 s_mv_ctxt.i4_ctb_y = ps_proc->i4_ctb_y; in ihevcd_process()
678 s_mv_ctxt.ps_pu = ps_proc->ps_pu; in ihevcd_process()
679 s_mv_ctxt.ps_pic_pu = ps_proc->ps_pic_pu; in ihevcd_process()
681 s_mv_ctxt.pu4_pic_pu_idx_map = ps_proc->pu4_pic_pu_idx_map; in ihevcd_process()
682 s_mv_ctxt.pu4_pic_pu_idx = ps_proc->pu4_pic_pu_idx; in ihevcd_process()
683 s_mv_ctxt.pu1_pic_pu_map = ps_proc->pu1_pic_pu_map; in ihevcd_process()
684 s_mv_ctxt.i4_ctb_pu_cnt = ps_proc->i4_ctb_pu_cnt; in ihevcd_process()
685 s_mv_ctxt.i4_ctb_start_pu_idx = ps_proc->i4_ctb_start_pu_idx; in ihevcd_process()
686 s_mv_ctxt.u1_top_ctb_avail = ps_proc->u1_top_ctb_avail; in ihevcd_process()
687 s_mv_ctxt.u1_top_rt_ctb_avail = ps_proc->u1_top_rt_ctb_avail; in ihevcd_process()
688 s_mv_ctxt.u1_top_lt_ctb_avail = ps_proc->u1_top_lt_ctb_avail; in ihevcd_process()
689 s_mv_ctxt.u1_left_ctb_avail = ps_proc->u1_left_ctb_avail; in ihevcd_process()
695 ihevcd_inter_pred_ctb(ps_proc); in ihevcd_process()
702 UWORD8 *pu1_pic_pu_map_ctb = ps_proc->pu1_pic_pu_map + in ihevcd_process()
703 … (ps_proc->i4_ctb_x + ps_proc->i4_ctb_y * ps_sps->i2_pic_wd_in_ctb) * num_minpu_in_ctb; in ihevcd_process()
705 UWORD32 *pu4_nbr_pu_idx = ps_proc->pu4_pic_pu_idx_map; in ihevcd_process()
712 cur_ctb_idx = ps_proc->i4_ctb_x in ihevcd_process()
713 + ps_proc->i4_ctb_y * (ps_sps->i2_pic_wd_in_ctb); in ihevcd_process()
714 next_ctb_idx = ps_proc->i4_next_pu_ctb_cnt; in ihevcd_process()
715 num_pu_per_ctb = ps_proc->pu4_pic_pu_idx[next_ctb_idx] in ihevcd_process()
716 - ps_proc->pu4_pic_pu_idx[cur_ctb_idx]; in ihevcd_process()
717 ctb_start_pu_idx = ps_proc->pu4_pic_pu_idx[cur_ctb_idx]; in ihevcd_process()
718 ps_pu = &ps_proc->ps_pic_pu[ctb_start_pu_idx]; in ihevcd_process()
739 - (ps_proc->i4_ctb_y << ps_sps->i1_log2_ctb_size); in ihevcd_process()
744ps_proc->u4_ctb_top_left_pu_idx = ps_proc->pu4_pic_pu_idx_top[((ps_proc->i4_ctb_x + 1) * ctb_size … in ihevcd_process()
749 ps_proc->pu4_pic_pu_idx_left[i] = in ihevcd_process()
753ps_proc->pu4_pic_pu_idx_top[(ps_proc->i4_ctb_x * ctb_size / MIN_PU_SIZE) + i] = in ihevcd_process()
764 … - (ps_proc->i4_ctb_y << ps_sps->i1_log2_ctb_size)) / MIN_PU_SIZE), ctb_size_in_min_pu); in ihevcd_process()
766 … - (ps_proc->i4_ctb_x << ps_sps->i1_log2_ctb_size)) / MIN_PU_SIZE), ctb_size_in_min_pu); in ihevcd_process()
786 if(ps_proc->ps_pps->i1_tiles_enabled_flag) in ihevcd_process()
789 UWORD16 *pu1_tile_idx = ps_proc->pu1_tile_idx; in ihevcd_process()
790 pu1_tile_idx[(ps_proc->i4_ctb_x + (ps_proc->i4_ctb_y * ps_sps->i2_pic_wd_in_ctb))] in ihevcd_process()
791 = ps_proc->i4_cur_tile_idx; in ihevcd_process()
801 ps_slice_hdr = ps_proc->ps_slice_hdr; in ihevcd_process()
815 ihevcd_update_ctb_tu_cnt(ps_proc); in ihevcd_process()
816 ps_proc->s_bs_ctxt.ps_pps = ps_proc->ps_pps; in ihevcd_process()
817 ps_proc->s_bs_ctxt.ps_sps = ps_proc->ps_sps; in ihevcd_process()
818 ps_proc->s_bs_ctxt.ps_codec = ps_proc->ps_codec; in ihevcd_process()
819 ps_proc->s_bs_ctxt.i4_ctb_tu_cnt = ps_proc->i4_ctb_tu_cnt; in ihevcd_process()
820 ps_proc->s_bs_ctxt.i4_ctb_x = ps_proc->i4_ctb_x; in ihevcd_process()
821 ps_proc->s_bs_ctxt.i4_ctb_y = ps_proc->i4_ctb_y; in ihevcd_process()
822 ps_proc->s_bs_ctxt.i4_ctb_tile_x = ps_proc->i4_ctb_tile_x; in ihevcd_process()
823 ps_proc->s_bs_ctxt.i4_ctb_tile_y = ps_proc->i4_ctb_tile_y; in ihevcd_process()
824 ps_proc->s_bs_ctxt.i4_ctb_slice_x = ps_proc->i4_ctb_slice_x; in ihevcd_process()
825 ps_proc->s_bs_ctxt.i4_ctb_slice_y = ps_proc->i4_ctb_slice_y; in ihevcd_process()
826 ps_proc->s_bs_ctxt.ps_tu = ps_proc->ps_tu; in ihevcd_process()
827 ps_proc->s_bs_ctxt.ps_pu = ps_proc->ps_pu; in ihevcd_process()
828 ps_proc->s_bs_ctxt.pu4_pic_pu_idx_map = ps_proc->pu4_pic_pu_idx_map; in ihevcd_process()
829 ps_proc->s_bs_ctxt.i4_next_pu_ctb_cnt = ps_proc->i4_next_pu_ctb_cnt; in ihevcd_process()
830 ps_proc->s_bs_ctxt.i4_next_tu_ctb_cnt = ps_proc->i4_next_tu_ctb_cnt; in ihevcd_process()
831 ps_proc->s_bs_ctxt.pu1_slice_idx = ps_proc->pu1_slice_idx; in ihevcd_process()
832 ps_proc->s_bs_ctxt.ps_slice_hdr = ps_proc->ps_slice_hdr; in ihevcd_process()
833 ps_proc->s_bs_ctxt.ps_tile = ps_proc->ps_tile; in ihevcd_process()
837 ihevcd_ctb_boundary_strength_islice(&ps_proc->s_bs_ctxt); in ihevcd_process()
841 ihevcd_ctb_boundary_strength_pbslice(&ps_proc->s_bs_ctxt); in ihevcd_process()
850 … UWORD32 *pu4_vert_bs = (UWORD32 *)((UWORD8 *)ps_proc->s_bs_ctxt.pu4_pic_vert_bs + in ihevcd_process()
851 ps_proc->i4_ctb_x * (ctb_size * ctb_size / 8 / 16) + in ihevcd_process()
852 ps_proc->i4_ctb_y * bs_strd); in ihevcd_process()
853 … UWORD32 *pu4_horz_bs = (UWORD32 *)((UWORD8 *)ps_proc->s_bs_ctxt.pu4_pic_horz_bs + in ihevcd_process()
854 ps_proc->i4_ctb_x * (ctb_size * ctb_size / 8 / 16) + in ihevcd_process()
855 ps_proc->i4_ctb_y * bs_strd); in ihevcd_process()
866 WORD32 cur_ctb_idx = ps_proc->i4_ctb_x in ihevcd_process()
867 + ps_proc->i4_ctb_y * (ps_sps->i2_pic_wd_in_ctb); in ihevcd_process()
870 ps_proc->pu1_pu_map += nctb * num_minpu_in_ctb; in ihevcd_process()
871 ps_proc->ps_tu += ps_proc->i4_ctb_tu_cnt; in ihevcd_process()
875 ps_proc->ps_tu = ps_proc->ps_pic_tu; in ihevcd_process()
877 ps_proc->ps_pu += ps_proc->i4_ctb_pu_cnt; in ihevcd_process()
881 ihevcd_proc_map_update(ps_proc, proc_type, nctb); in ihevcd_process()
884 ihevcd_ctb_pos_update(ps_proc, nctb); in ihevcd_process()
888 if(cur_slice_idx != ps_proc->i4_cur_slice_idx) in ihevcd_process()
890ps_proc->ps_slice_hdr = ps_codec->ps_slice_hdr_base + ((cur_slice_idx)&(MAX_SLICE_HDR_CNT - 1)); in ihevcd_process()
891 ps_proc->i4_cur_slice_idx = cur_slice_idx; in ihevcd_process()
895 ps_proc->i4_ctb_x -= num_ctb; in ihevcd_process()
896 ps_proc->i4_ctb_tile_x = cur_ctb_tile_x; in ihevcd_process()
897 ps_proc->i4_ctb_slice_x = cur_ctb_slice_x; in ihevcd_process()
898 ps_proc->i4_ctb_tile_y = cur_ctb_tile_y; in ihevcd_process()
899 ps_proc->i4_ctb_slice_y = cur_ctb_slice_y; in ihevcd_process()
900 ps_proc->pu1_pu_map = pu1_pu_map_cur; in ihevcd_process()
901 ps_proc->ps_tu = ps_tu_cur; in ihevcd_process()
908 ihevcd_proc_map_check(ps_proc, proc_type, nctb); in ihevcd_process()
910 ihevcd_slice_hdr_update(ps_proc); in ihevcd_process()
914 ihevcd_ctb_avail_update(ps_proc); in ihevcd_process()
920 ihevcd_update_ctb_tu_cnt(ps_proc); in ihevcd_process()
928 ps_proc->api2_dequant_intra_matrix[0] = in ihevcd_process()
930 ps_proc->api2_dequant_intra_matrix[1] = in ihevcd_process()
932 ps_proc->api2_dequant_intra_matrix[2] = in ihevcd_process()
934 ps_proc->api2_dequant_intra_matrix[3] = in ihevcd_process()
937 ps_proc->api2_dequant_inter_matrix[0] = in ihevcd_process()
939 ps_proc->api2_dequant_inter_matrix[1] = in ihevcd_process()
941 ps_proc->api2_dequant_inter_matrix[2] = in ihevcd_process()
943 ps_proc->api2_dequant_inter_matrix[3] = in ihevcd_process()
950 ps_proc->api2_dequant_intra_matrix[0] = in ihevcd_process()
952 ps_proc->api2_dequant_intra_matrix[1] = in ihevcd_process()
954 ps_proc->api2_dequant_intra_matrix[2] = in ihevcd_process()
956 ps_proc->api2_dequant_intra_matrix[3] = in ihevcd_process()
959 ps_proc->api2_dequant_inter_matrix[0] = in ihevcd_process()
961 ps_proc->api2_dequant_inter_matrix[1] = in ihevcd_process()
963 ps_proc->api2_dequant_inter_matrix[2] = in ihevcd_process()
965 ps_proc->api2_dequant_inter_matrix[3] = in ihevcd_process()
973 ps_proc->pu1_cur_ctb_luma = ps_proc->pu1_cur_pic_luma in ihevcd_process()
974 + (ps_proc->i4_ctb_x * ctb_size in ihevcd_process()
975 + ps_proc->i4_ctb_y * ctb_size in ihevcd_process()
977 ps_proc->pu1_cur_ctb_chroma = ps_proc->pu1_cur_pic_chroma in ihevcd_process()
978 + ps_proc->i4_ctb_x * ctb_size in ihevcd_process()
979 + (ps_proc->i4_ctb_y * ctb_size * ps_codec->i4_strd / 2); in ihevcd_process()
981 ihevcd_iquant_itrans_recon_ctb(ps_proc); in ihevcd_process()
986 WORD32 cur_ctb_idx = ps_proc->i4_ctb_x in ihevcd_process()
987 + ps_proc->i4_ctb_y * (ps_sps->i2_pic_wd_in_ctb); in ihevcd_process()
990 ps_proc->pu1_pu_map += nctb * num_minpu_in_ctb; in ihevcd_process()
991 ps_proc->ps_tu += ps_proc->i4_ctb_tu_cnt; in ihevcd_process()
995 ps_proc->ps_tu = ps_proc->ps_pic_tu; in ihevcd_process()
997 ps_proc->ps_pu += ps_proc->i4_ctb_pu_cnt; in ihevcd_process()
1002 ihevcd_proc_map_update(ps_proc, proc_type, nctb); in ihevcd_process()
1005 ihevcd_ctb_pos_update(ps_proc, nctb); in ihevcd_process()
1008 if(cur_slice_idx != ps_proc->i4_cur_slice_idx) in ihevcd_process()
1010ps_proc->ps_slice_hdr = ps_codec->ps_slice_hdr_base + ((cur_slice_idx)&(MAX_SLICE_HDR_CNT - 1)); in ihevcd_process()
1011 ps_proc->i4_cur_slice_idx = cur_slice_idx; in ihevcd_process()
1015 ps_proc->i4_ctb_x -= num_ctb; in ihevcd_process()
1016 ps_proc->i4_ctb_tile_x = cur_ctb_tile_x; in ihevcd_process()
1017 ps_proc->i4_ctb_slice_x = cur_ctb_slice_x; in ihevcd_process()
1018 ps_proc->i4_ctb_tile_y = cur_ctb_tile_y; in ihevcd_process()
1019 ps_proc->i4_ctb_slice_y = cur_ctb_slice_y; in ihevcd_process()
1020 pu1_pu_map_nxt = ps_proc->pu1_pu_map; in ihevcd_process()
1021 ps_tu_nxt = ps_proc->ps_tu; in ihevcd_process()
1022 ps_proc->pu1_pu_map = pu1_pu_map_cur; in ihevcd_process()
1023 ps_proc->ps_tu = ps_tu_cur; in ihevcd_process()
1031 ihevcd_proc_map_check(ps_proc, proc_type, nctb); in ihevcd_process()
1033 ihevcd_slice_hdr_update(ps_proc); in ihevcd_process()
1046 ps_proc->s_deblk_ctxt.ps_pps = ps_proc->ps_pps; in ihevcd_process()
1047 ps_proc->s_deblk_ctxt.ps_sps = ps_proc->ps_sps; in ihevcd_process()
1048 ps_proc->s_deblk_ctxt.ps_codec = ps_proc->ps_codec; in ihevcd_process()
1049 ps_proc->s_deblk_ctxt.ps_slice_hdr = ps_proc->ps_slice_hdr; in ihevcd_process()
1050 ps_proc->s_deblk_ctxt.i4_ctb_x = ps_proc->i4_ctb_x; in ihevcd_process()
1051 ps_proc->s_deblk_ctxt.i4_ctb_y = ps_proc->i4_ctb_y; in ihevcd_process()
1052 ps_proc->s_deblk_ctxt.pu1_slice_idx = ps_proc->pu1_slice_idx; in ihevcd_process()
1053ps_proc->s_deblk_ctxt.is_chroma_yuv420sp_vu = (ps_codec->e_ref_chroma_fmt == IV_YUV_420SP_VU); in ihevcd_process()
1064 …WORD32 bit_pos = ((ps_proc->i4_ctb_y << (log2_ctb_size - 3)) - 1) * loop_filter_strd + (ps_proc->i… in ihevcd_process()
1069ps_proc->s_deblk_ctxt.au2_ctb_no_loop_filter_flag[row] = (*(UWORD32 *)(ps_proc->pu1_pic_no_loop_fi… in ihevcd_process()
1074 ihevcd_deblk_ctb(&ps_proc->s_deblk_ctxt, i4_is_last_ctb_x, i4_is_last_ctb_y); in ihevcd_process()
1079 if(ps_proc->i4_ctb_x == ps_sps->i2_pic_wd_in_ctb - 1) in ihevcd_process()
1088 … ihevcd_deblk_ctb(&ps_proc->s_deblk_ctxt, i4_is_last_ctb_x, i4_is_last_ctb_y); in ihevcd_process()
1096 if(ps_proc->i4_ctb_y == ps_sps->i2_pic_ht_in_ctb - 1) in ihevcd_process()
1104 … ihevcd_deblk_ctb(&ps_proc->s_deblk_ctxt, i4_is_last_ctb_x, i4_is_last_ctb_y); in ihevcd_process()
1111 ihevcd_proc_map_update(ps_proc, proc_type, nctb); in ihevcd_process()
1114 ihevcd_ctb_pos_update(ps_proc, nctb); in ihevcd_process()
1117 if(cur_slice_idx != ps_proc->i4_cur_slice_idx) in ihevcd_process()
1119ps_proc->ps_slice_hdr = ps_codec->ps_slice_hdr_base + ((cur_slice_idx)&(MAX_SLICE_HDR_CNT - 1)); in ihevcd_process()
1120 ps_proc->i4_cur_slice_idx = cur_slice_idx; in ihevcd_process()
1124 ps_proc->i4_ctb_x -= num_ctb; in ihevcd_process()
1125 ps_proc->i4_ctb_tile_x = cur_ctb_tile_x; in ihevcd_process()
1126 ps_proc->i4_ctb_tile_y = cur_ctb_tile_y; in ihevcd_process()
1127 ps_proc->pu1_pu_map = pu1_pu_map_cur; in ihevcd_process()
1128 ps_proc->ps_tu = ps_tu_cur; in ihevcd_process()
1129 nxt_ctb_slice_y = ps_proc->i4_ctb_slice_y; in ihevcd_process()
1130 nxt_ctb_slice_x = ps_proc->i4_ctb_slice_x; in ihevcd_process()
1131 ps_proc->i4_ctb_slice_y = cur_ctb_slice_y; in ihevcd_process()
1132 ps_proc->i4_ctb_slice_x = cur_ctb_slice_x; in ihevcd_process()
1140 ihevcd_proc_map_check(ps_proc, proc_type, nctb); in ihevcd_process()
1142 ihevcd_slice_hdr_update(ps_proc); in ihevcd_process()
1152 ps_proc->s_sao_ctxt.ps_pps = ps_proc->ps_pps; in ihevcd_process()
1153 ps_proc->s_sao_ctxt.ps_sps = ps_proc->ps_sps; in ihevcd_process()
1154 ps_proc->s_sao_ctxt.ps_tile = ps_proc->ps_tile; in ihevcd_process()
1155 ps_proc->s_sao_ctxt.ps_codec = ps_proc->ps_codec; in ihevcd_process()
1156 ps_proc->s_sao_ctxt.ps_slice_hdr = ps_proc->ps_slice_hdr; in ihevcd_process()
1157 ps_proc->s_sao_ctxt.i4_cur_slice_idx = ps_proc->i4_cur_slice_idx; in ihevcd_process()
1161 ps_proc->s_sao_ctxt.i4_ctb_x = ps_proc->i4_ctb_x; in ihevcd_process()
1162 ps_proc->s_sao_ctxt.i4_ctb_y = ps_proc->i4_ctb_y; in ihevcd_process()
1163ps_proc->s_sao_ctxt.is_chroma_yuv420sp_vu = (ps_codec->e_ref_chroma_fmt == IV_YUV_420SP_VU); in ihevcd_process()
1165 ihevcd_sao_shift_ctb(&ps_proc->s_sao_ctxt); in ihevcd_process()
1167 if(ps_proc->i4_ctb_x > 1 && ps_proc->i4_ctb_y > 0) in ihevcd_process()
1169 ps_proc->s_sao_ctxt.i4_ctb_x = ps_proc->i4_ctb_x - 2; in ihevcd_process()
1170 ps_proc->s_sao_ctxt.i4_ctb_y = ps_proc->i4_ctb_y - 1; in ihevcd_process()
1172 ihevcd_sao_ctb(&ps_proc->s_sao_ctxt); in ihevcd_process()
1175 if(ps_sps->i2_pic_wd_in_ctb - 1 == ps_proc->i4_ctb_x && ps_proc->i4_ctb_y > 0) in ihevcd_process()
1177 ps_proc->s_sao_ctxt.i4_ctb_x = ps_proc->i4_ctb_x - 1; in ihevcd_process()
1178 ps_proc->s_sao_ctxt.i4_ctb_y = ps_proc->i4_ctb_y - 1; in ihevcd_process()
1180 ihevcd_sao_ctb(&ps_proc->s_sao_ctxt); in ihevcd_process()
1182 ps_proc->s_sao_ctxt.i4_ctb_x = ps_proc->i4_ctb_x; in ihevcd_process()
1183 ps_proc->s_sao_ctxt.i4_ctb_y = ps_proc->i4_ctb_y - 1; in ihevcd_process()
1185 ihevcd_sao_ctb(&ps_proc->s_sao_ctxt); in ihevcd_process()
1187 if(ps_sps->i2_pic_ht_in_ctb - 1 == ps_proc->i4_ctb_y) in ihevcd_process()
1190 ps_proc->s_sao_ctxt.i4_ctb_y = ps_proc->i4_ctb_y; in ihevcd_process()
1193 ps_proc->s_sao_ctxt.i4_ctb_x = i4_ctb_x; in ihevcd_process()
1194 ihevcd_sao_ctb(&ps_proc->s_sao_ctxt); in ihevcd_process()
1206 if(0 == ps_proc->i4_ctb_x) in ihevcd_process()
1211 ps_proc->pu1_cur_ctb_luma = ps_proc->pu1_cur_pic_luma in ihevcd_process()
1212 + (ps_proc->i4_ctb_x * ctb_size in ihevcd_process()
1213 + ps_proc->i4_ctb_y * ctb_size in ihevcd_process()
1215 ps_proc->pu1_cur_ctb_chroma = ps_proc->pu1_cur_pic_chroma in ihevcd_process()
1216 + ps_proc->i4_ctb_x * ctb_size in ihevcd_process()
1217 + (ps_proc->i4_ctb_y * ctb_size * ps_codec->i4_strd / 2); in ihevcd_process()
1220 pad_ht_luma += (ps_sps->i2_pic_ht_in_ctb - 1) == ps_proc->i4_ctb_y ? 8 : 0; in ihevcd_process()
1223 …ps_codec->s_func_selector.ihevc_pad_left_luma_fptr(ps_proc->pu1_cur_ctb_luma - 8 * ps_codec->i4_st… in ihevcd_process()
1224 …ps_codec->s_func_selector.ihevc_pad_left_chroma_fptr(ps_proc->pu1_cur_ctb_chroma - 16 * ps_codec->… in ihevcd_process()
1227 if((ps_sps->i2_pic_wd_in_ctb - 1) == ps_proc->i4_ctb_x) in ihevcd_process()
1231 …WORD32 cols_remaining = ps_sps->i2_pic_width_in_luma_samples - (ps_proc->i4_ctb_x << ps_sps->i1_lo… in ihevcd_process()
1233 ps_proc->pu1_cur_ctb_luma = ps_proc->pu1_cur_pic_luma in ihevcd_process()
1234 + (ps_proc->i4_ctb_x * ctb_size in ihevcd_process()
1235 + ps_proc->i4_ctb_y * ctb_size in ihevcd_process()
1237 ps_proc->pu1_cur_ctb_chroma = ps_proc->pu1_cur_pic_chroma in ihevcd_process()
1238 + ps_proc->i4_ctb_x * ctb_size in ihevcd_process()
1239 + (ps_proc->i4_ctb_y * ctb_size * ps_codec->i4_strd / 2); in ihevcd_process()
1243 if((ps_sps->i2_pic_ht_in_ctb - 1) == ps_proc->i4_ctb_y) in ihevcd_process()
1247 …ps_codec->s_func_selector.ihevc_pad_left_chroma_fptr(ps_proc->pu1_cur_pic_chroma + (ps_sps->i2_pic… in ihevcd_process()
1251 …ps_codec->s_func_selector.ihevc_pad_right_luma_fptr(ps_proc->pu1_cur_ctb_luma + cols_remaining - 8… in ihevcd_process()
1252 …ps_codec->s_func_selector.ihevc_pad_right_chroma_fptr(ps_proc->pu1_cur_ctb_chroma + cols_remaining… in ihevcd_process()
1254 if((ps_sps->i2_pic_ht_in_ctb - 1) == ps_proc->i4_ctb_y) in ihevcd_process()
1260 …ihevc_pad_top(ps_proc->pu1_cur_pic_luma - PAD_LEFT, ps_codec->i4_strd, ps_sps->i2_pic_width_in_lum… in ihevcd_process()
1261 …ihevc_pad_top(ps_proc->pu1_cur_pic_chroma - PAD_LEFT, ps_codec->i4_strd, ps_sps->i2_pic_width_in_l… in ihevcd_process()
1263 …pu1_buf = ps_proc->pu1_cur_pic_luma + ps_codec->i4_strd * ps_sps->i2_pic_height_in_luma_samples - … in ihevcd_process()
1267 …pu1_buf = ps_proc->pu1_cur_pic_chroma + ps_codec->i4_strd * (ps_sps->i2_pic_height_in_luma_samples… in ihevcd_process()
1272 if(ps_proc->i4_ctb_y > 1) in ihevcd_process()
1274 if(0 == ps_proc->i4_ctb_x) in ihevcd_process()
1282 …ps_codec->s_func_selector.ihevc_pad_left_luma_fptr(ps_proc->pu1_cur_ctb_luma - 2 * ctb_size * ps_c… in ihevcd_process()
1283 …ps_codec->s_func_selector.ihevc_pad_left_chroma_fptr(ps_proc->pu1_cur_ctb_chroma - ctb_size * ps_c… in ihevcd_process()
1285 else if((ps_sps->i2_pic_wd_in_ctb - 1) == ps_proc->i4_ctb_x) in ihevcd_process()
1289 …WORD32 cols_remaining = ps_sps->i2_pic_width_in_luma_samples - (ps_proc->i4_ctb_x << ps_sps->i1_lo… in ihevcd_process()
1291 … pad_ht_luma = ((ps_sps->i2_pic_ht_in_ctb - 1) == ps_proc->i4_ctb_y) ? 3 * ctb_size : ctb_size; in ihevcd_process()
1292 …pad_ht_chroma = ((ps_sps->i2_pic_ht_in_ctb - 1) == ps_proc->i4_ctb_y) ? 3 * ctb_size / 2 : ctb_siz… in ihevcd_process()
1294 …ps_codec->s_func_selector.ihevc_pad_right_luma_fptr(ps_proc->pu1_cur_ctb_luma + cols_remaining - 2… in ihevcd_process()
1295 …ps_codec->s_func_selector.ihevc_pad_right_chroma_fptr(ps_proc->pu1_cur_ctb_chroma + cols_remaining… in ihevcd_process()
1297 if((ps_sps->i2_pic_ht_in_ctb - 1) == ps_proc->i4_ctb_y) in ihevcd_process()
1306 …ps_codec->s_func_selector.ihevc_pad_left_luma_fptr(ps_proc->pu1_cur_pic_luma + ps_codec->i4_strd *… in ihevcd_process()
1308 …ps_codec->s_func_selector.ihevc_pad_left_chroma_fptr(ps_proc->pu1_cur_pic_chroma + ps_codec->i4_st… in ihevcd_process()
1314 …ihevc_pad_top(ps_proc->pu1_cur_pic_luma - PAD_LEFT, ps_codec->i4_strd, ps_sps->i2_pic_width_in_lum… in ihevcd_process()
1315 …ihevc_pad_top(ps_proc->pu1_cur_pic_chroma - PAD_LEFT, ps_codec->i4_strd, ps_sps->i2_pic_width_in_l… in ihevcd_process()
1317 …pu1_buf = ps_proc->pu1_cur_pic_luma + ps_codec->i4_strd * ps_sps->i2_pic_height_in_luma_samples - … in ihevcd_process()
1321 …pu1_buf = ps_proc->pu1_cur_pic_chroma + ps_codec->i4_strd * (ps_sps->i2_pic_height_in_luma_samples… in ihevcd_process()
1332 ihevcd_proc_map_update(ps_proc, proc_type, nctb); in ihevcd_process()
1334 ihevcd_proc_map_update(ps_proc, PROC_ALL, nctb); in ihevcd_process()
1338 ps_tile = ps_proc->ps_tile; in ihevcd_process()
1341 ps_proc->i4_ctb_tile_x += nctb; in ihevcd_process()
1342 ps_proc->i4_ctb_x += nctb; in ihevcd_process()
1344 ps_proc->i4_ctb_slice_x += nctb; in ihevcd_process()
1348 if(ps_proc->i4_ctb_tile_x >= (ps_tile->u2_wd)) in ihevcd_process()
1351 ps_proc->i4_ctb_tile_x = 0; in ihevcd_process()
1352 ps_proc->i4_ctb_x = ps_tile->u1_pos_x; in ihevcd_process()
1354 ps_proc->i4_ctb_tile_y++; in ihevcd_process()
1355 ps_proc->i4_ctb_y++; in ihevcd_process()
1356 if(ps_proc->i4_ctb_tile_y == ps_tile->u2_ht) in ihevcd_process()
1359 ps_proc->i4_ctb_tile_y = 0; in ihevcd_process()
1360 ps_proc->i4_ctb_tile_x = 0; in ihevcd_process()
1361 ps_proc->ps_tile++; in ihevcd_process()
1365 ps_tile = ps_proc->ps_tile; in ihevcd_process()
1366 ps_proc->i4_ctb_x = ps_tile->u1_pos_x; in ihevcd_process()
1367 ps_proc->i4_ctb_y = ps_tile->u1_pos_y; in ihevcd_process()
1375 ps_proc->i4_ctb_cnt -= num_ctb; in ihevcd_process()
1380 void ihevcd_init_proc_ctxt(process_ctxt_t *ps_proc, WORD32 tu_coeff_data_ofst) in ihevcd_init_proc_ctxt() argument
1398 ps_codec = ps_proc->ps_codec; in ihevcd_init_proc_ctxt()
1400 …ps_slice_hdr = ps_codec->ps_slice_hdr_base + ((ps_proc->i4_cur_slice_idx) & (MAX_SLICE_HDR_CNT - 1… in ihevcd_init_proc_ctxt()
1401 ps_proc->ps_slice_hdr = ps_slice_hdr; in ihevcd_init_proc_ctxt()
1402 ps_proc->ps_pps = ps_codec->ps_pps_base + ps_slice_hdr->i1_pps_id; in ihevcd_init_proc_ctxt()
1403 ps_pps = ps_proc->ps_pps; in ihevcd_init_proc_ctxt()
1404 ps_proc->ps_sps = ps_codec->ps_sps_base + ps_pps->i1_sps_id; in ihevcd_init_proc_ctxt()
1405 ps_sps = ps_proc->ps_sps; in ihevcd_init_proc_ctxt()
1406 ps_proc->i4_init_done = 1; in ihevcd_init_proc_ctxt()
1411 ps_proc->s_sao_ctxt.pu1_slice_idx = ps_proc->pu1_slice_idx; in ihevcd_init_proc_ctxt()
1413 ihevcd_get_tile_pos(ps_pps, ps_sps, ps_proc->i4_ctb_x, ps_proc->i4_ctb_y, in ihevcd_init_proc_ctxt()
1414 &ps_proc->i4_ctb_tile_x, &ps_proc->i4_ctb_tile_y, in ihevcd_init_proc_ctxt()
1417 ps_proc->ps_tile = ps_pps->ps_tile + tile_idx; in ihevcd_init_proc_ctxt()
1418 ps_proc->i4_cur_tile_idx = tile_idx; in ihevcd_init_proc_ctxt()
1419 ps_tile = ps_proc->ps_tile; in ihevcd_init_proc_ctxt()
1457 if(ps_proc->i4_ctb_x >= i2_independent_ctb_x) in ihevcd_init_proc_ctxt()
1459 ps_proc->i4_ctb_slice_x = ps_proc->i4_ctb_x - i2_independent_ctb_x; in ihevcd_init_proc_ctxt()
1479 ps_proc->i4_ctb_slice_x = i4_wd_in_ctb in ihevcd_init_proc_ctxt()
1480 - (i2_independent_ctb_x - ps_proc->i4_ctb_x); in ihevcd_init_proc_ctxt()
1484 ps_proc->i4_ctb_slice_x = ps_proc->i4_ctb_x - ps_tile->u1_pos_x; in ihevcd_init_proc_ctxt()
1490 ps_proc->i4_ctb_slice_y = ps_proc->i4_ctb_y - i2_independent_ctb_y; in ihevcd_init_proc_ctxt()
1493 if((0 == ps_proc->i4_ctb_tile_x) && (0 == ps_proc->i4_ctb_tile_y)) in ihevcd_init_proc_ctxt()
1497 ps_proc->i4_ctb_slice_x = 0; in ihevcd_init_proc_ctxt()
1498 ps_proc->i4_ctb_slice_y = 0; in ihevcd_init_proc_ctxt()
1503 ps_proc->i4_ctb_slice_y = ps_tile->u1_pos_y - i2_independent_ctb_y; in ihevcd_init_proc_ctxt()
1516 ps_proc->i4_ctb_slice_y -= 1; in ihevcd_init_proc_ctxt()
1523 if(((i2_independent_ctb_x - ps_tile->u1_pos_x) != 0) && ((ps_proc->i4_ctb_slice_y != 0)) in ihevcd_init_proc_ctxt()
1526 ps_proc->i4_ctb_slice_y -= 1; in ihevcd_init_proc_ctxt()
1537 ps_proc->i4_ctb_slice_x = ps_proc->i4_ctb_x - i2_independent_ctb_x; in ihevcd_init_proc_ctxt()
1538 ps_proc->i4_ctb_slice_y = ps_proc->i4_ctb_y - i2_independent_ctb_y; in ihevcd_init_proc_ctxt()
1539 if(ps_proc->i4_ctb_slice_x < 0) in ihevcd_init_proc_ctxt()
1541 ps_proc->i4_ctb_slice_x += ps_sps->i2_pic_wd_in_ctb; in ihevcd_init_proc_ctxt()
1542 ps_proc->i4_ctb_slice_y -= 1; in ihevcd_init_proc_ctxt()
1556 ctb_addr = ps_proc->i4_ctb_y * num_ctb_in_row + ps_proc->i4_ctb_x; in ihevcd_init_proc_ctxt()
1561 ps_proc->pu1_tu_map = ps_proc->pu1_pic_tu_map in ihevcd_init_proc_ctxt()
1565ps_proc->ps_tu = ps_proc->ps_pic_tu + ps_proc->pu4_pic_tu_idx[ctb_addr % RESET_TU_BUF_NCTB]; in ihevcd_init_proc_ctxt()
1569 ps_proc->ps_tu = ps_proc->ps_pic_tu + ps_proc->pu4_pic_tu_idx[ctb_addr]; in ihevcd_init_proc_ctxt()
1571 ps_proc->pv_tu_coeff_data = (UWORD8 *)ps_proc->pv_pic_tu_coeff_data in ihevcd_init_proc_ctxt()
1579 ctb_addr = ps_proc->i4_ctb_y * num_ctb_in_row + ps_proc->i4_ctb_x; in ihevcd_init_proc_ctxt()
1580 pu_idx = ps_proc->pu4_pic_pu_idx[ctb_addr]; in ihevcd_init_proc_ctxt()
1581 ps_proc->pu1_pu_map = ps_proc->pu1_pic_pu_map in ihevcd_init_proc_ctxt()
1583 ps_proc->ps_pu = ps_proc->ps_pic_pu + pu_idx; in ihevcd_init_proc_ctxt()
1588 ps_proc->i4_nctb = MIN(ps_codec->u4_nctb, ps_tile->u2_wd); in ihevcd_init_proc_ctxt()
1592 void ihevcd_process_thread(process_ctxt_t *ps_proc) in ihevcd_process_thread() argument
1596 ithread_set_affinity(ps_proc->i4_id + 1); in ihevcd_process_thread()
1602 codec_t *ps_dec = ps_proc->ps_codec; in ihevcd_process_thread()
1605 ret = ithread_mutex_lock(ps_dec->apv_proc_start_mutex[ps_proc->i4_id]); in ihevcd_process_thread()
1609 while(!ps_dec->ai4_process_start[ps_proc->i4_id]) in ihevcd_process_thread()
1611 ithread_cond_wait(ps_dec->apv_proc_start_condition[ps_proc->i4_id], in ihevcd_process_thread()
1612 ps_dec->apv_proc_start_mutex[ps_proc->i4_id]); in ihevcd_process_thread()
1614 ps_dec->ai4_process_start[ps_proc->i4_id] = 0; in ihevcd_process_thread()
1615 ret = ithread_mutex_unlock(ps_dec->apv_proc_start_mutex[ps_proc->i4_id]); in ihevcd_process_thread()
1628 ret = ihevcd_jobq_dequeue((jobq_t *)ps_proc->pv_proc_jobq, &s_job, in ihevcd_process_thread()
1633 ps_proc->i4_ctb_cnt = s_job.i2_ctb_cnt; in ihevcd_process_thread()
1634 ps_proc->i4_ctb_x = s_job.i2_ctb_x; in ihevcd_process_thread()
1635 ps_proc->i4_ctb_y = s_job.i2_ctb_y; in ihevcd_process_thread()
1636 ps_proc->i4_cur_slice_idx = s_job.i2_slice_idx; in ihevcd_process_thread()
1642 ihevcd_init_proc_ctxt(ps_proc, s_job.i4_tu_coeff_data_ofst); in ihevcd_process_thread()
1643 ihevcd_process(ps_proc); in ihevcd_process_thread()
1652 if(0 == ps_proc->i4_init_done) in ihevcd_process_thread()
1654 ihevcd_init_proc_ctxt(ps_proc, 0); in ihevcd_process_thread()
1656 ps_sps = ps_proc->ps_sps; in ihevcd_process_thread()
1657 ps_codec = ps_proc->ps_codec; in ihevcd_process_thread()
1658 ps_out_buffer = ps_proc->ps_out_buffer; in ihevcd_process_thread()
1668 ihevcd_fmt_conv(ps_proc->ps_codec, ps_proc, ps_out_buffer->pu1_bufs[0], in ihevcd_process_thread()
1674 ret = ithread_mutex_lock(ps_dec->apv_proc_done_mutex[ps_proc->i4_id]); in ihevcd_process_thread()
1678 ps_dec->ai4_process_done[ps_proc->i4_id] = 1; in ihevcd_process_thread()
1679 ithread_cond_signal(ps_dec->apv_proc_done_condition[ps_proc->i4_id]); in ihevcd_process_thread()
1681 ret = ithread_mutex_unlock(ps_dec->apv_proc_done_mutex[ps_proc->i4_id]); in ihevcd_process_thread()