Lines Matching refs:cu

555 void code_skip_flag(H265eSlice *slice, RK_U32 abs_part_idx, DataCu *cu)  in code_skip_flag()  argument
561 RK_U32 tpelx = cu->pixelX + sps->raster2pelx[sps->zscan2raster[abs_part_idx]]; in code_skip_flag()
562 RK_U32 tpely = cu->pixelY + sps->raster2pely[sps->zscan2raster[abs_part_idx]]; in code_skip_flag()
566 if (cu->cur_addr == 0 ) { in code_skip_flag()
568 } else if ((tpely == 0) || (tpelx == cu->tile_start_x)) { in code_skip_flag()
584 static void code_split_flag(H265eSlice *slice, RK_U32 abs_part_idx, RK_U32 depth, DataCu *cu) in code_split_flag() argument
591 …h265e_dbg_skip("depth %d cu->m_cuDepth %d", depth, cu->m_cuDepth[sps->zscan2raster[abs_part_idx]]); in code_split_flag()
594 RK_U32 currSplitFlag = (cu->m_cuDepth[sps->zscan2raster[abs_part_idx]] > depth) ? 1 : 0; in code_split_flag()
599 static void encode_cu(H265eSlice *slice, RK_U32 abs_part_idx, RK_U32 depth, DataCu *cu) in encode_cu() argument
603 RK_U32 lpelx = cu->pixelX + sps->raster2pelx[sps->zscan2raster[abs_part_idx]]; in encode_cu()
605 RK_U32 tpely = cu->pixelY + sps->raster2pely[sps->zscan2raster[abs_part_idx]]; in encode_cu()
610 if ((rpelx <= cu->tile_end_x) && (bpely <= cu->tile_end_y)) { in encode_cu()
612 code_split_flag(slice, abs_part_idx, depth, cu); in encode_cu()
618 …h265e_dbg_skip("m_cuDepth[%d] = %d maxCUDepth %d, m_addCUDepth %d", abs_part_idx, cu->m_cuDepth[sp… in encode_cu()
620 …if ((depth < cu->m_cuDepth[sps->zscan2raster[abs_part_idx]] && (depth < (sps->m_maxCUDepth - sps->… in encode_cu()
627 lpelx = cu->pixelX + sps->raster2pelx[sps->zscan2raster[abs_part_idx]]; in encode_cu()
628 tpely = cu->pixelY + sps->raster2pely[sps->zscan2raster[abs_part_idx]]; in encode_cu()
629 if ((lpelx <= cu->tile_end_x) && (tpely <= cu->tile_end_y)) { in encode_cu()
630 encode_cu(slice, abs_part_idx, depth + 1, cu); in encode_cu()
637 code_skip_flag(slice, abs_part_idx, cu); in encode_cu()
643 static void proc_cu8(DataCu *cu, RK_S32 nSubPart, RK_S32 cuDepth, RK_S32 puIdx) in proc_cu8() argument
647 memset(cu->m_cuDepth + puIdx * nSubPart, cuDepth, nSubPart); in proc_cu8()
650 static void proc_cu16(DataCu *cu, RK_U32 pos_x, RK_U32 pos_y, in proc_cu16() argument
658 if ((cu->pixelX + pos_x + 15 <= cu->tile_end_x) && in proc_cu16()
659 (cu->pixelY + pos_y + 15 <= cu->tile_end_y)) { in proc_cu16()
661 memset(cu->m_cuDepth + puIdx * nSubPart, cuDepth, nSubPart); in proc_cu16()
663 } else if ((cu->pixelX + pos_x > cu->tile_end_x) || in proc_cu16()
664 (cu->pixelY + pos_y > cu->tile_end_y)) { in proc_cu16()
666 memset(cu->m_cuDepth + puIdx * nSubPart, cuDepth, nSubPart); in proc_cu16()
672 proc_cu8(cu, nSubPart / 4, cuDepth + 1, newPuIdx); in proc_cu16()
676 static void proc_cu32(DataCu *cu, RK_U32 pos_x, RK_U32 pos_y, in proc_cu32() argument
686 if ((cu->pixelX + pos_x + 31 <= cu->tile_end_x) && in proc_cu32()
687 (cu->pixelY + pos_y + 31 <= cu->tile_end_y)) { in proc_cu32()
689 memset(cu->m_cuDepth + puIdx * nSubPart, cuDepth, nSubPart); in proc_cu32()
691 } else if ((cu->pixelX + pos_x > cu->tile_end_x) || in proc_cu32()
692 (cu->pixelY + pos_y > cu->tile_end_y)) { in proc_cu32()
694 memset(cu->m_cuDepth + puIdx * nSubPart, cuDepth, nSubPart); in proc_cu32()
702 proc_cu16(cu, cu_x_1, cu_y_1, nSubPart / 4, cuDepth + 1, newPuIdx); in proc_cu32()
706 static void proc_ctu64(H265eSlice *slice, DataCu *cu) in proc_ctu64() argument
712 RK_U32 lpelx = cu->pixelX; in proc_ctu64()
714 RK_U32 tpely = cu->pixelY; in proc_ctu64()
720 cu->m_cuDepth[k] = 0; in proc_ctu64()
721 cu->m_cuSize[k] = m_nCtuSize; in proc_ctu64()
723 if ((rpelx <= cu->tile_end_x) && (bpely <= cu->tile_end_y)) in proc_ctu64()
729 proc_cu32(cu, cu_x_1, cu_y_1, numPartions / 4, cuDepth + 1, m); in proc_ctu64()
733 switch (cu->m_cuDepth[k]) { in proc_ctu64()
734 case 0: cu->m_cuSize[k] = 64; break; in proc_ctu64()
735 case 1: cu->m_cuSize[k] = 32; break; in proc_ctu64()
736 case 2: cu->m_cuSize[k] = 16; break; in proc_ctu64()
737 case 3: cu->m_cuSize[k] = 8; break; in proc_ctu64()
764 static void proc_ctu32(H265eSlice *slice, DataCu *cu) in proc_ctu32() argument
770 RK_U32 lpelx = cu->pixelX; in proc_ctu32()
772 RK_U32 tpely = cu->pixelY; in proc_ctu32()
778 cu->m_cuDepth[k] = 0; in proc_ctu32()
779 cu->m_cuSize[k] = m_nCtuSize; in proc_ctu32()
781 if ((rpelx <= cu->tile_end_x) && (bpely <= cu->tile_end_y)) in proc_ctu32()
787 proc_cu16(cu, cu_x_1, cu_y_1, numPartions / 4, cuDepth + 1, m); in proc_ctu32()
791 switch (cu->m_cuDepth[k]) { in proc_ctu32()
792 case 0: cu->m_cuSize[k] = 32; break; in proc_ctu32()
793 case 1: cu->m_cuSize[k] = 16; break; in proc_ctu32()
794 case 2: cu->m_cuSize[k] = 8; break; in proc_ctu32()
801 DataCu cu; in h265e_code_skip_tile() local
824 cu.tile_start_x = tile->tile_start_x; in h265e_code_skip_tile()
825 cu.tile_end_x = tile->tile_end_x; in h265e_code_skip_tile()
826 cu.tile_end_y = tile->tile_end_y; in h265e_code_skip_tile()
828 cu.pixelX = offset_x; in h265e_code_skip_tile()
829 cu.pixelY = offset_y; in h265e_code_skip_tile()
830 cu.cur_addr = cu_cnt; in h265e_code_skip_tile()
831 proc_ctu(slice, &cu); in h265e_code_skip_tile()
832 encode_cu(slice, 0, 0, &cu); in h265e_code_skip_tile()
841 cu.pixelX = offset_x; in h265e_code_skip_tile()
842 cu.pixelY = offset_y; in h265e_code_skip_tile()
843 cu.cur_addr = cu_cnt; in h265e_code_skip_tile()
844 proc_ctu(slice, &cu); in h265e_code_skip_tile()
845 encode_cu(slice, 0, 0, &cu); in h265e_code_skip_tile()