/external/libhevc/common/ |
D | ihevc_deblk_edge_filter.c | 121 beta_indx = CLIP3(qp_luma + (beta_offset_div2 << 1), 0, 51); in ihevc_deblk_luma_vert() 128 tc_indx = CLIP3(qp_luma + (2 * (bs >> 1)) + (tc_offset_div2 << 1), 0, 53); in ihevc_deblk_luma_vert() 202 tmp_q0 = CLIP3((pu1_src[2] + 2 * pu1_src[1] + in ihevc_deblk_luma_vert() 208 tmp_q1 = CLIP3((pu1_src[2] + pu1_src[1] + pu1_src[0] + in ihevc_deblk_luma_vert() 213 tmp_q2 = CLIP3((2 * pu1_src[3] + 3 * pu1_src[2] + in ihevc_deblk_luma_vert() 219 tmp_p0 = CLIP3((pu1_src[1] + 2 * pu1_src[0] + in ihevc_deblk_luma_vert() 225 tmp_p1 = CLIP3((pu1_src[0] + pu1_src[-1] + in ihevc_deblk_luma_vert() 230 tmp_p2 = CLIP3((pu1_src[0] + pu1_src[-1] + in ihevc_deblk_luma_vert() 242 delta = CLIP3(delta, -tc, tc); in ihevc_deblk_luma_vert() 249 delta_p = CLIP3((((pu1_src[-3] + pu1_src[-1] + 1) >> 1) in ihevc_deblk_luma_vert() [all …]
|
D | ihevc_sao.c | 115 … pu1_src[col] = CLIP3(pu1_src[col] + pi1_sao_offset[band_idx], 0, (1 << (band_shift + 5)) - 1); in ihevc_sao_band_offset_luma() 177 … pu1_src[col] = CLIP3(pu1_src[col] + pi1_sao_offset[band_idx], 0, (1 << (band_shift + 5)) - 1); in ihevc_sao_band_offset_chroma() 248 … pu1_src[col] = CLIP3(pu1_src[col] + pi1_sao_offset[edge_idx], 0, (1 << bit_depth) - 1); in ihevc_sao_edge_offset_class0() 347 … pu1_src[col] = CLIP3(pu1_src[col] + pi1_sao_offset[edge_idx], 0, (1 << bit_depth) - 1); in ihevc_sao_edge_offset_class0_chroma() 440 … pu1_src[col] = CLIP3(pu1_src[col] + pi1_sao_offset[edge_idx], 0, (1 << bit_depth) - 1); in ihevc_sao_edge_offset_class1() 539 … pu1_src[col] = CLIP3(pu1_src[col] + pi1_sao_offset[edge_idx], 0, (1 << bit_depth) - 1); in ihevc_sao_edge_offset_class1_chroma() 617 u1_pos_0_0_tmp = CLIP3(pu1_src[0] + pi1_sao_offset[edge_idx], 0, (1 << bit_depth) - 1); in ihevc_sao_edge_offset_class2() 641 …u1_pos_wd_ht_tmp = CLIP3(pu1_src[wd - 1 + (ht - 1) * src_strd] + pi1_sao_offset[edge_idx], 0, (1 <… in ihevc_sao_edge_offset_class2() 707 … pu1_src[col] = CLIP3(pu1_src[col] + pi1_sao_offset[edge_idx], 0, (1 << bit_depth) - 1); in ihevc_sao_edge_offset_class2() 813 … u1_pos_0_0_tmp_u = CLIP3(pu1_src[0] + pi1_sao_offset_u[edge_idx], 0, (1 << bit_depth) - 1); in ihevc_sao_edge_offset_class2_chroma() [all …]
|
D | ihevc_macros.h | 40 #define CLIP3(x, min, max) (((x) > (max)) ? (max) :(((x) < (min))? (min):(x))) macro
|
D | ihevc_trans_macros.h | 173 …clip_coeff = CLIP3(coeff,coeff_min,coeff_max); …
|
/external/libhevc/common/mips/ |
D | ihevc_platform_macros.h | 38 #define CLIP_U8(x) CLIP3((x), 0, 255) 39 #define CLIP_S8(x) CLIP3((x), -128, 127) 41 #define CLIP_U10(x) CLIP3((x), 0, 1023); 42 #define CLIP_S10(x) CLIP3((x), -512, 511); 44 #define CLIP_U12(x) CLIP3((x), 0, 4095); 45 #define CLIP_S12(x) CLIP3((x), -2048, 2047); 47 #define CLIP_U16(x) CLIP3((x), 0, 65535) 48 #define CLIP_S16(x) CLIP3((x), -32768, 32767)
|
/external/libavc/common/mips/ |
D | ih264_platform_macros.h | 41 #define CLIP_U8(x) CLIP3(0, 255, (x)) 42 #define CLIP_S8(x) CLIP3(-128, 127, (x)) 44 #define CLIP_U10(x) CLIP3(0, 1023, (x)) 45 #define CLIP_S10(x) CLIP3(-512, 511, (x)) 47 #define CLIP_U12(x) CLIP3(0, 4095, (x)) 48 #define CLIP_S12(x) CLIP3(-2048, 2047, (x)) 50 #define CLIP_U16(x) CLIP3(0, 65535, (x)) 51 #define CLIP_S16(x) CLIP3(-32768, 32767, (x))
|
/external/libavc/common/x86/ |
D | ih264_platform_macros.h | 44 #define CLIP_U8(x) CLIP3(0, 255, (x)) 45 #define CLIP_S8(x) CLIP3(-128, 127, (x)) 47 #define CLIP_U10(x) CLIP3(0, 1023, (x)) 48 #define CLIP_S10(x) CLIP3(-512, 511, (x)) 50 #define CLIP_U12(x) CLIP3(0, 4095, (x)) 51 #define CLIP_S12(x) CLIP3(-2048, 2047, (x)) 53 #define CLIP_U16(x) CLIP3(0, 65535, (x)) 54 #define CLIP_S16(x) CLIP3(-32768, 32767, (x))
|
/external/libhevc/common/x86/ |
D | ihevc_platform_macros.h | 42 #define CLIP_U8(x) CLIP3((x), 0, 255) 43 #define CLIP_S8(x) CLIP3((x), -128, 127) 45 #define CLIP_U10(x) CLIP3((x), 0, 1023); 46 #define CLIP_S10(x) CLIP3((x), -512, 511); 48 #define CLIP_U12(x) CLIP3((x), 0, 4095); 49 #define CLIP_S12(x) CLIP3((x), -2048, 2047); 51 #define CLIP_U16(x) CLIP3((x), 0, 65535) 52 #define CLIP_S16(x) CLIP3((x), -32768, 32767)
|
D | ihevc_deblk_ssse3_intr.c | 129 beta_indx = CLIP3(qp_luma + (beta_offset_div2 << 1), 0, 51); in ihevc_deblk_luma_vert_ssse3() 136 tc_indx = CLIP3(qp_luma + (2 * (bs >> 1)) + (tc_offset_div2 << 1), 0, 53); in ihevc_deblk_luma_vert_ssse3() 569 beta_indx = CLIP3(qp_luma + (beta_offset_div2 << 1), 0, 51); in ihevc_deblk_luma_horz_ssse3() 576 tc_indx = CLIP3(qp_luma + 2 * (bs >> 1) + (tc_offset_div2 << 1), 0, 53); in ihevc_deblk_luma_horz_ssse3() 1014 tc_indx_u = CLIP3(qp_chroma_u + 2 + (tc_offset_div2 << 1), 0, 53); in ihevc_deblk_chroma_vert_ssse3() 1017 tc_indx_v = CLIP3(qp_chroma_v + 2 + (tc_offset_div2 << 1), 0, 53); in ihevc_deblk_chroma_vert_ssse3() 1167 tc_indx_u = CLIP3(qp_chroma_u + 2 + (tc_offset_div2 << 1), 0, 53); in ihevc_deblk_chroma_horz_ssse3() 1170 tc_indx_v = CLIP3(qp_chroma_v + 2 + (tc_offset_div2 << 1), 0, 53); in ihevc_deblk_chroma_horz_ssse3()
|
/external/libavc/common/armv8/ |
D | ih264_platform_macros.h | 98 #define CLIP_U8(x) CLIP3(0, 255, (x)) 99 #define CLIP_S8(x) CLIP3(-128, 127, (x)) 101 #define CLIP_U10(x) CLIP3(0, 1023, (x)) 102 #define CLIP_S10(x) CLIP3(-512, 511, (x)) 104 #define CLIP_U12(x) CLIP3(0, 4095, (x)) 105 #define CLIP_S12(x) CLIP3(-2048, 2047, (x)) 107 #define CLIP_U16(x) CLIP3(0, 65535, (x)) 108 #define CLIP_S16(x) CLIP3(-32768, 32767, (x))
|
/external/libavc/common/arm/ |
D | ih264_platform_macros.h | 98 #define CLIP_U8(x) CLIP3(0, 255, (x)) 99 #define CLIP_S8(x) CLIP3(-128, 127, (x)) 101 #define CLIP_U10(x) CLIP3(0, 1023, (x)) 102 #define CLIP_S10(x) CLIP3(-512, 511, (x)) 104 #define CLIP_U12(x) CLIP3(0, 4095, (x)) 105 #define CLIP_S12(x) CLIP3(-2048, 2047, (x)) 107 #define CLIP_U16(x) CLIP3(0, 65535, (x)) 108 #define CLIP_S16(x) CLIP3(-32768, 32767, (x))
|
/external/libhevc/common/arm/ |
D | ihevc_platform_macros.h | 93 #define CLIP_U8(x) CLIP3((x), 0, 255) 94 #define CLIP_S8(x) CLIP3((x), -128, 127) 96 #define CLIP_U10(x) CLIP3((x), 0, 1023); 97 #define CLIP_S10(x) CLIP3((x), -512, 511); 99 #define CLIP_U12(x) CLIP3((x), 0, 4095); 100 #define CLIP_S12(x) CLIP3((x), -2048, 2047); 102 #define CLIP_U16(x) CLIP3((x), 0, 65535) 103 #define CLIP_S16(x) CLIP3((x), -32768, 32767)
|
/external/libhevc/decoder/ |
D | ihevcd_parse_slice_header.c | 173 … ps_rplm->i1_list_entry_l0[i] = CLIP3(ps_rplm->i1_list_entry_l0[i], 0, num_poc_total_curr - 1); in ihevcd_ref_pic_list_modification() 188 … ps_rplm->i1_list_entry_l1[i] = CLIP3(ps_rplm->i1_list_entry_l1[i], 0, num_poc_total_curr - 1); in ihevcd_ref_pic_list_modification() 252 pps_id = CLIP3(pps_id, 0, MAX_PPS_CNT - 2); in ihevcd_parse_slice_header() 425 …ps_slice_hdr->i1_short_term_ref_pic_set_idx = CLIP3(ps_slice_hdr->i1_short_term_ref_pic_set_idx, 0… in ihevcd_parse_slice_header() 453 ps_slice_hdr->i1_num_long_term_sps = CLIP3(ps_slice_hdr->i1_num_long_term_sps, in ihevcd_parse_slice_header() 458 ps_slice_hdr->i1_num_long_term_pics = CLIP3(ps_slice_hdr->i1_num_long_term_pics, in ihevcd_parse_slice_header() 573 …ps_slice_hdr->i1_num_ref_idx_l0_active = CLIP3(ps_slice_hdr->i1_num_ref_idx_l0_active, 0, MAX_DPB_… in ihevcd_parse_slice_header() 574 …ps_slice_hdr->i1_num_ref_idx_l1_active = CLIP3(ps_slice_hdr->i1_num_ref_idx_l1_active, 0, MAX_DPB_… in ihevcd_parse_slice_header() 620 …ps_slice_hdr->i1_collocated_ref_idx = CLIP3(ps_slice_hdr->i1_collocated_ref_idx, 0, MAX_DPB_SIZE -… in ihevcd_parse_slice_header() 631 ps_slice_hdr->i1_max_num_merge_cand = CLIP3(ps_slice_hdr->i1_max_num_merge_cand, 1, 5); in ihevcd_parse_slice_header() [all …]
|
D | ihevcd_inter_pred.c | 274 …mv = CLIP3(ps_pu->mv.s_l0_mv.i2_mvx, (-((MAX_CTB_SIZE + pu_x + 7) << 2)), ((ps_sps->i2_pic_width_i… in ihevcd_inter_pred_ctb() 278 …mv = CLIP3(ps_pu->mv.s_l0_mv.i2_mvy, (-((MAX_CTB_SIZE + pu_y + 7) << 2)), ((ps_sps->i2_pic_height_… in ihevcd_inter_pred_ctb() 293 …mv = CLIP3(ps_pu->mv.s_l1_mv.i2_mvx, (-((MAX_CTB_SIZE + pu_x + 7) << 2)), ((ps_sps->i2_pic_width_i… in ihevcd_inter_pred_ctb() 297 …mv = CLIP3(ps_pu->mv.s_l1_mv.i2_mvy, (-((MAX_CTB_SIZE + pu_y + 7) << 2)), ((ps_sps->i2_pic_height_… in ihevcd_inter_pred_ctb() 321 …mv = CLIP3(ps_pu->mv.s_l0_mv.i2_mvx, (-((MAX_CTB_SIZE + pu_x + 7) << 2)), ((ps_sps->i2_pic_width_i… in ihevcd_inter_pred_ctb() 325 …mv = CLIP3(ps_pu->mv.s_l0_mv.i2_mvy, (-((MAX_CTB_SIZE + pu_y + 7) << 2)), ((ps_sps->i2_pic_height_… in ihevcd_inter_pred_ctb() 339 …mv = CLIP3(ps_pu->mv.s_l1_mv.i2_mvx, (-((MAX_CTB_SIZE + pu_x + 7) << 2)), ((ps_sps->i2_pic_width_i… in ihevcd_inter_pred_ctb() 343 …mv = CLIP3(ps_pu->mv.s_l1_mv.i2_mvy, (-((MAX_CTB_SIZE + pu_y + 7) << 2)), ((ps_sps->i2_pic_height_… in ihevcd_inter_pred_ctb()
|
D | ihevcd_parse_headers.c | 393 r_idx = CLIP3(r_idx, 0, idx - 1); in ihevcd_short_term_ref_pic_set() 451 num_neg_pics = CLIP3(num_neg_pics, 0, MAX_DPB_SIZE - 1); in ihevcd_short_term_ref_pic_set() 452 num_pos_pics = CLIP3(num_pos_pics, 0, (MAX_DPB_SIZE - 1 - num_neg_pics)); in ihevcd_short_term_ref_pic_set() 497 ps_stref_picset->i1_num_neg_pics = CLIP3(ps_stref_picset->i1_num_neg_pics, in ihevcd_short_term_ref_pic_set() 503 ps_stref_picset->i1_num_pos_pics = CLIP3(ps_stref_picset->i1_num_pos_pics, in ihevcd_short_term_ref_pic_set() 977 value = CLIP3(value, 0, matrix_id); in ihevcd_scaling_list_data() 1198 vps_id = CLIP3(vps_id, 0, MAX_VPS_CNT - 1); in ihevcd_parse_sps() 1202 sps_max_sub_layers = CLIP3(sps_max_sub_layers, 1, 7); in ihevcd_parse_sps() 1414 …ps_sps->i1_num_short_term_ref_pic_sets = CLIP3(ps_sps->i1_num_short_term_ref_pic_sets, 0, MAX_STRE… in ihevcd_parse_sps() 1651 ps_pps->i1_sps_id = CLIP3(ps_pps->i1_sps_id, 0, MAX_SPS_CNT - 2); in ihevcd_parse_pps()
|
D | ihevcd_mv_pred.c | 120 dist_scale_factor = CLIP3(dist_scale_factor, -4096, 4095); in ihevcd_scale_mv() 180 dist_scale_factor = CLIP3(dist_scale_factor, -4096, 4095); in ihevcd_scale_collocated_mv()
|
D | ihevcd_iquant_itrans_recon_ctb.c | 895 chroma_qp_idx = CLIP3(chroma_qp_idx, 0, 57); in ihevcd_iquant_itrans_recon_ctb() 906 chroma_qp_idx = CLIP3(chroma_qp_idx, 0, 57); in ihevcd_iquant_itrans_recon_ctb()
|
/external/libavc/common/ |
D | ih264_deblk_edge_filters.c | 593 delta = CLIP3(-tc, tc, val); in ih264_deblk_luma_vert_bslt4() 607 pu1_src_temp[pos_p1] += CLIP3(-tc0, tc0, val); in ih264_deblk_luma_vert_bslt4() 614 pu1_src_temp[pos_q1] += CLIP3(-tc0, tc0, val); in ih264_deblk_luma_vert_bslt4() 707 delta = CLIP3(-tc, tc, val); in ih264_deblk_chroma_vert_bslt4_bp() 722 delta = CLIP3(-tc, tc, val); in ih264_deblk_chroma_vert_bslt4_bp() 827 delta = CLIP3(-tc, tc, val); in ih264_deblk_luma_horz_bslt4() 840 pu1_p2_temp[pos_p1] += CLIP3(-tc0, tc0, val); in ih264_deblk_luma_horz_bslt4() 847 pu1_src_temp[pos_q1] += CLIP3(-tc0, tc0, val); in ih264_deblk_luma_horz_bslt4() 949 delta = CLIP3(-tc, tc, val); in ih264_deblk_chroma_horz_bslt4_bp() 962 delta = CLIP3(-tc, tc, val); in ih264_deblk_chroma_horz_bslt4_bp() [all …]
|
D | ih264_macros.h | 75 #define CLIP3(miny, maxy, y) (((y) < (miny))?(miny):(((y) > (maxy))?(maxy):(y))) macro
|
/external/libavc/encoder/ |
D | ih264e_me.c | 269 mvx = CLIP3(i4_srch_range_w, i4_srch_range_e, mvx); in ih264e_get_search_candidates() 270 mvy = CLIP3(i4_srch_range_n, i4_srch_range_s, mvy); in ih264e_get_search_candidates() 284 mvx = CLIP3(i4_srch_range_w, i4_srch_range_e, mvx); in ih264e_get_search_candidates() 285 mvy = CLIP3(i4_srch_range_n, i4_srch_range_s, mvy); in ih264e_get_search_candidates() 298 mvx = CLIP3(i4_srch_range_w, i4_srch_range_e, mvx); in ih264e_get_search_candidates() 299 mvy = CLIP3(i4_srch_range_n, i4_srch_range_s, mvy); in ih264e_get_search_candidates() 312 mvx = CLIP3(i4_srch_range_w, i4_srch_range_e, mvx); in ih264e_get_search_candidates() 313 mvy = CLIP3(i4_srch_range_n, i4_srch_range_s, mvy); in ih264e_get_search_candidates() 340 mvx = CLIP3(i4_srch_range_w, i4_srch_range_e, mvx); in ih264e_get_search_candidates() 341 mvy = CLIP3(i4_srch_range_n, i4_srch_range_s, mvy); in ih264e_get_search_candidates() [all …]
|
D | ime_macros.h | 41 #define CLIP3(miny, maxy, y) (((y) < (miny))?(miny):(((y) > maxy)?(maxy):(y))) macro
|
D | ih264e_cabac_encode.c | 1484 u1_abs_mvd_x = CLIP3(0, 127, ABS(u2_mv)); in ih264e_cabac_enc_mvds_p16x16() 1491 u1_abs_mvd_y = CLIP3(0, 127, ABS(u2_mv)); in ih264e_cabac_enc_mvds_p16x16() 1549 u1_abs_mvd_x = CLIP3(0, 127, ABS(u2_mv)); in ih264e_cabac_enc_mvds_b16x16() 1556 u1_abs_mvd_y = CLIP3(0, 127, ABS(u2_mv)); in ih264e_cabac_enc_mvds_b16x16() 1580 u1_abs_mvd_x = CLIP3(0, 127, ABS(u2_mv)); in ih264e_cabac_enc_mvds_b16x16() 1587 u1_abs_mvd_y = CLIP3(0, 127, ABS(u2_mv)); in ih264e_cabac_enc_mvds_b16x16()
|
D | ime.c | 723 …s_clip_skip_mv.i2_mvx = CLIP3(ps_me_ctxt->i4_srch_range_w, ps_me_ctxt->i4_srch_range_e, s_skip_mv.… in ime_compute_skip_cost() 724 …s_clip_skip_mv.i2_mvy = CLIP3(ps_me_ctxt->i4_srch_range_n, ps_me_ctxt->i4_srch_range_s, s_skip_mv.… in ime_compute_skip_cost()
|
/external/libavc/decoder/ |
D | ih264d_inter_pred.c | 270 i2_frm_x = CLIP3(MAX_OFFSET_OUTSIDE_X_FRM, (ps_dec->u2_pic_wd - 1), in ih264d_form_mb_part_info_bp() 272 i2_frm_y = CLIP3(((1 - u1_dma_ht)), (u2_pic_ht - (1)), i2_frm_y); in ih264d_form_mb_part_info_bp() 363 i2_frm_x = CLIP3(MAX_OFFSET_OUTSIDE_UV_FRM, in ih264d_form_mb_part_info_bp() 365 i2_frm_y = CLIP3(((1 - u1_dma_ht)), (u2_pic_ht - (1)), i2_frm_y); in ih264d_form_mb_part_info_bp() 624 i2_frm_x = CLIP3(MAX_OFFSET_OUTSIDE_X_FRM, (ps_dec->u2_pic_wd - 1), in ih264d_form_mb_part_info_mp() 626 i2_frm_y = CLIP3(((1 - u1_dma_ht) << u1_mb_fld), in ih264d_form_mb_part_info_mp() 770 i2_frm_x = CLIP3(MAX_OFFSET_OUTSIDE_UV_FRM, in ih264d_form_mb_part_info_mp() 772 i2_frm_y = CLIP3(((1 - u1_dma_ht) << u1_mb_fld), in ih264d_form_mb_part_info_mp()
|
D | ih264d_parse_bslice.c | 1222 i16_tb = CLIP3(-128, 127, i16_tb); in ih264d_get_implicit_weights() 1224 i16_td = CLIP3(-128, 127, i16_td); in ih264d_get_implicit_weights() 1226 i2_dist_scale_factor = CLIP3(-1024, 1023, in ih264d_get_implicit_weights() 1292 i16_tb = CLIP3(-128, 127, i16_tb); in ih264d_get_implicit_weights() 1294 i16_td = CLIP3(-128, 127, i16_td); in ih264d_get_implicit_weights() 1297 i2_dist_scale_factor = CLIP3( in ih264d_get_implicit_weights()
|