Lines Matching refs:ps_sps
149 sps_t *ps_sps, in ihevcd_parse_pred_wt_ofst() argument
168 if(ps_sps->i1_chroma_format_idc != 0) in ihevcd_parse_pred_wt_ofst()
187 if(ps_sps->i1_chroma_format_idc != 0) in ihevcd_parse_pred_wt_ofst()
287 if(ps_sps->i1_chroma_format_idc != 0) in ihevcd_parse_pred_wt_ofst()
1447 sps_t *ps_sps; in ihevcd_parse_sps() local
1485 ps_sps = (ps_codec->s_parse.ps_sps_base + MAX_SPS_CNT - 1); in ihevcd_parse_sps()
1488 WORD16 *pi2_scaling_mat = ps_sps->pi2_scaling_mat; in ihevcd_parse_sps()
1489 memset(ps_sps, 0, sizeof(sps_t)); in ihevcd_parse_sps()
1490 ps_sps->pi2_scaling_mat = pi2_scaling_mat; in ihevcd_parse_sps()
1492 ps_sps->i1_sps_id = sps_id; in ihevcd_parse_sps()
1493 ps_sps->i1_vps_id = vps_id; in ihevcd_parse_sps()
1494 ps_sps->i1_sps_max_sub_layers = sps_max_sub_layers; in ihevcd_parse_sps()
1495 ps_sps->i1_sps_temporal_id_nesting_flag = sps_temporal_id_nesting_flag; in ihevcd_parse_sps()
1497 memcpy(&ps_sps->s_ptl, &s_ptl, sizeof(profile_tier_lvl_info_t)); in ihevcd_parse_sps()
1504 ps_sps->i1_chroma_format_idc = value; in ihevcd_parse_sps()
1506 if(ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_YUV420) in ihevcd_parse_sps()
1512 if(CHROMA_FMT_IDC_YUV444_PLANES == ps_sps->i1_chroma_format_idc) in ihevcd_parse_sps()
1515 ps_sps->i1_separate_colour_plane_flag = value; in ihevcd_parse_sps()
1519 ps_sps->i1_separate_colour_plane_flag = 0; in ihevcd_parse_sps()
1527 ps_sps->i2_pic_width_in_luma_samples = value; in ihevcd_parse_sps()
1534 ps_sps->i2_pic_height_in_luma_samples = value; in ihevcd_parse_sps()
1536 if((0 >= ps_sps->i2_pic_width_in_luma_samples) || (0 >= ps_sps->i2_pic_height_in_luma_samples)) in ihevcd_parse_sps()
1540 ps_sps->i1_pic_cropping_flag = value; in ihevcd_parse_sps()
1542 if(ps_sps->i1_pic_cropping_flag) in ihevcd_parse_sps()
1546 if (value >= ps_sps->i2_pic_width_in_luma_samples) in ihevcd_parse_sps()
1550 ps_sps->i2_pic_crop_left_offset = value; in ihevcd_parse_sps()
1553 if (value >= ps_sps->i2_pic_width_in_luma_samples) in ihevcd_parse_sps()
1557 ps_sps->i2_pic_crop_right_offset = value; in ihevcd_parse_sps()
1560 if (value >= ps_sps->i2_pic_height_in_luma_samples) in ihevcd_parse_sps()
1564 ps_sps->i2_pic_crop_top_offset = value; in ihevcd_parse_sps()
1567 if (value >= ps_sps->i2_pic_height_in_luma_samples) in ihevcd_parse_sps()
1571 ps_sps->i2_pic_crop_bottom_offset = value; in ihevcd_parse_sps()
1575 ps_sps->i2_pic_crop_left_offset = 0; in ihevcd_parse_sps()
1576 ps_sps->i2_pic_crop_right_offset = 0; in ihevcd_parse_sps()
1577 ps_sps->i2_pic_crop_top_offset = 0; in ihevcd_parse_sps()
1578 ps_sps->i2_pic_crop_bottom_offset = 0; in ihevcd_parse_sps()
1593 ps_sps->i1_log2_max_pic_order_cnt_lsb = value + 4; in ihevcd_parse_sps()
1597 ps_sps->i1_sps_sub_layer_ordering_info_present_flag = value; in ihevcd_parse_sps()
1600 …i = (ps_sps->i1_sps_sub_layer_ordering_info_present_flag ? 0 : (ps_sps->i1_sps_max_sub_layers - 1)… in ihevcd_parse_sps()
1601 for(; i < ps_sps->i1_sps_max_sub_layers; i++) in ihevcd_parse_sps()
1608 ps_sps->ai1_sps_max_dec_pic_buffering[i] = value + 1; in ihevcd_parse_sps()
1611 if(value >= ps_sps->ai1_sps_max_dec_pic_buffering[i]) in ihevcd_parse_sps()
1615 ps_sps->ai1_sps_max_num_reorder_pics[i] = value; in ihevcd_parse_sps()
1622 ps_sps->ai1_sps_max_latency_increase[i] = value; in ihevcd_parse_sps()
1629 sps_t *ps_sps_old = ps_codec->s_parse.ps_sps; in ihevcd_parse_sps()
1631 ps_sps->ai1_sps_max_dec_pic_buffering[ps_sps->i1_sps_max_sub_layers - 1]) in ihevcd_parse_sps()
1642 ps_sps->ai1_sps_max_num_reorder_pics[ps_sps->i1_sps_max_sub_layers - 1]) in ihevcd_parse_sps()
1658 ps_sps->i1_log2_min_coding_block_size = value + 3; in ihevcd_parse_sps()
1659 if((ps_sps->i2_pic_width_in_luma_samples % (1 << ps_sps->i1_log2_min_coding_block_size) != 0) || in ihevcd_parse_sps()
1660 … (ps_sps->i2_pic_height_in_luma_samples % (1 << ps_sps->i1_log2_min_coding_block_size) != 0)) in ihevcd_parse_sps()
1666 if(value > (LOG2_MAX_CU_SIZE - ps_sps->i1_log2_min_coding_block_size)) in ihevcd_parse_sps()
1670 ps_sps->i1_log2_diff_max_min_coding_block_size = value; in ihevcd_parse_sps()
1672 …ctb_log2_size_y = ps_sps->i1_log2_min_coding_block_size + ps_sps->i1_log2_diff_max_min_coding_bloc… in ihevcd_parse_sps()
1678 ps_sps->i1_log2_ctb_size = ctb_log2_size_y; in ihevcd_parse_sps()
1685 ps_sps->i1_log2_min_transform_block_size = value + 2; in ihevcd_parse_sps()
1686 if(ps_sps->i1_log2_min_transform_block_size >= ps_sps->i1_log2_min_coding_block_size) in ihevcd_parse_sps()
1692 if(value > (LOG2_MAX_TU_SIZE - ps_sps->i1_log2_min_transform_block_size)) in ihevcd_parse_sps()
1696 ps_sps->i1_log2_diff_max_min_transform_block_size = value; in ihevcd_parse_sps()
1698 ps_sps->i1_log2_max_transform_block_size = ps_sps->i1_log2_min_transform_block_size + in ihevcd_parse_sps()
1699 ps_sps->i1_log2_diff_max_min_transform_block_size; in ihevcd_parse_sps()
1701 if(ps_sps->i1_log2_max_transform_block_size > ps_sps->i1_log2_ctb_size) in ihevcd_parse_sps()
1706 ps_sps->i1_log2_min_pcm_coding_block_size = 0; in ihevcd_parse_sps()
1707 ps_sps->i1_log2_diff_max_min_pcm_coding_block_size = 0; in ihevcd_parse_sps()
1710 if(value > (ps_sps->i1_log2_ctb_size - ps_sps->i1_log2_min_transform_block_size)) in ihevcd_parse_sps()
1714 ps_sps->i1_max_transform_hierarchy_depth_inter = value; in ihevcd_parse_sps()
1717 if(value > (ps_sps->i1_log2_ctb_size - ps_sps->i1_log2_min_transform_block_size)) in ihevcd_parse_sps()
1721 ps_sps->i1_max_transform_hierarchy_depth_intra = value; in ihevcd_parse_sps()
1725 ps_sps->i1_scaling_list_enable_flag = value; in ihevcd_parse_sps()
1727 if(ps_sps->i1_scaling_list_enable_flag) in ihevcd_parse_sps()
1729 COPY_DEFAULT_SCALING_LIST(ps_sps->pi2_scaling_mat); in ihevcd_parse_sps()
1731 ps_sps->i1_sps_scaling_list_data_present_flag = value; in ihevcd_parse_sps()
1733 if(ps_sps->i1_sps_scaling_list_data_present_flag) in ihevcd_parse_sps()
1734 ihevcd_scaling_list_data(ps_codec, ps_sps->pi2_scaling_mat); in ihevcd_parse_sps()
1738 COPY_FLAT_SCALING_LIST(ps_sps->pi2_scaling_mat); in ihevcd_parse_sps()
1742 ps_sps->i1_amp_enabled_flag = value; in ihevcd_parse_sps()
1745 ps_sps->i1_sample_adaptive_offset_enabled_flag = value; in ihevcd_parse_sps()
1748 ps_sps->i1_pcm_enabled_flag = value; in ihevcd_parse_sps()
1750 if(ps_sps->i1_pcm_enabled_flag) in ihevcd_parse_sps()
1753 ps_sps->i1_pcm_sample_bit_depth_luma = value + 1; in ihevcd_parse_sps()
1756 ps_sps->i1_pcm_sample_bit_depth_chroma = value + 1; in ihevcd_parse_sps()
1759 … if(value < (ps_sps->i1_log2_min_coding_block_size - 3) || value > (MIN(ctb_log2_size_y, 5) - 3)) in ihevcd_parse_sps()
1763 ps_sps->i1_log2_min_pcm_coding_block_size = value + 3; in ihevcd_parse_sps()
1766 if(value > MIN(ctb_log2_size_y, 5) - ps_sps->i1_log2_min_pcm_coding_block_size) in ihevcd_parse_sps()
1770 ps_sps->i1_log2_diff_max_min_pcm_coding_block_size = value; in ihevcd_parse_sps()
1772 ps_sps->i1_pcm_loop_filter_disable_flag = value; in ihevcd_parse_sps()
1780 ps_sps->i1_num_short_term_ref_pic_sets = value; in ihevcd_parse_sps()
1782 for(i = 0; i < ps_sps->i1_num_short_term_ref_pic_sets; i++) in ihevcd_parse_sps()
1784 …_short_term_ref_pic_set(ps_bitstrm, &ps_sps->as_stref_picset[0], ps_sps->i1_num_short_term_ref_pic… in ihevcd_parse_sps()
1792 ps_sps->i1_long_term_ref_pics_present_flag = value; in ihevcd_parse_sps()
1794 if(ps_sps->i1_long_term_ref_pics_present_flag) in ihevcd_parse_sps()
1801 ps_sps->i1_num_long_term_ref_pics_sps = value; in ihevcd_parse_sps()
1803 for(i = 0; i < ps_sps->i1_num_long_term_ref_pics_sps; i++) in ihevcd_parse_sps()
1805 …BITS_PARSE("lt_ref_pic_poc_lsb_sps[ i ]", value, ps_bitstrm, ps_sps->i1_log2_max_pic_order_cnt_lsb… in ihevcd_parse_sps()
1806 ps_sps->au2_lt_ref_pic_poc_lsb_sps[i] = value; in ihevcd_parse_sps()
1809 ps_sps->ai1_used_by_curr_pic_lt_sps_flag[i] = value; in ihevcd_parse_sps()
1814 ps_sps->i1_sps_temporal_mvp_enable_flag = value; in ihevcd_parse_sps()
1818 ps_sps->i1_strong_intra_smoothing_enable_flag = value; in ihevcd_parse_sps()
1821 ps_sps->i1_vui_parameters_present_flag = value; in ihevcd_parse_sps()
1823 if(ps_sps->i1_vui_parameters_present_flag) in ihevcd_parse_sps()
1826 &ps_sps->s_vui_parameters, in ihevcd_parse_sps()
1827 ps_sps->i1_sps_max_sub_layers - 1); in ihevcd_parse_sps()
1842 ceil_offset = (1 << ps_sps->i1_log2_ctb_size) - 1; in ihevcd_parse_sps()
1843 numerator = ps_sps->i2_pic_width_in_luma_samples; in ihevcd_parse_sps()
1845 ps_sps->i2_pic_wd_in_ctb = ((numerator + ceil_offset) / in ihevcd_parse_sps()
1846 (1 << ps_sps->i1_log2_ctb_size)); in ihevcd_parse_sps()
1848 numerator = ps_sps->i2_pic_height_in_luma_samples; in ihevcd_parse_sps()
1849 ps_sps->i2_pic_ht_in_ctb = ((numerator + ceil_offset) / in ihevcd_parse_sps()
1850 (1 << ps_sps->i1_log2_ctb_size)); in ihevcd_parse_sps()
1852 ps_sps->i4_pic_size_in_ctb = ps_sps->i2_pic_ht_in_ctb * in ihevcd_parse_sps()
1853 ps_sps->i2_pic_wd_in_ctb; in ihevcd_parse_sps()
1856 ps_codec->s_parse.i4_next_ctb_indx = ps_sps->i4_pic_size_in_ctb; in ihevcd_parse_sps()
1858 numerator = ps_sps->i2_pic_width_in_luma_samples; in ihevcd_parse_sps()
1859 ps_sps->i2_pic_wd_in_min_cb = numerator / in ihevcd_parse_sps()
1860 (1 << ps_sps->i1_log2_min_coding_block_size); in ihevcd_parse_sps()
1862 numerator = ps_sps->i2_pic_height_in_luma_samples; in ihevcd_parse_sps()
1863 ps_sps->i2_pic_ht_in_min_cb = numerator / in ihevcd_parse_sps()
1864 (1 << ps_sps->i1_log2_min_coding_block_size); in ihevcd_parse_sps()
1867 ((ps_codec->i4_wd != ps_sps->i2_pic_width_in_luma_samples) || in ihevcd_parse_sps()
1868 (ps_codec->i4_ht != ps_sps->i2_pic_height_in_luma_samples))) in ihevcd_parse_sps()
1878 if((ps_sps->i2_pic_width_in_luma_samples > MAX_WD) || in ihevcd_parse_sps()
1879 … ((ps_sps->i2_pic_width_in_luma_samples * ps_sps->i2_pic_height_in_luma_samples) > in ihevcd_parse_sps()
1892 if(CHROMA_FMT_IDC_YUV420 == ps_sps->i1_chroma_format_idc) in ihevcd_parse_sps()
1898 disp_wd = ps_sps->i2_pic_width_in_luma_samples; in ihevcd_parse_sps()
1899 disp_wd -= ps_sps->i2_pic_crop_left_offset * crop_unit_x; in ihevcd_parse_sps()
1900 disp_wd -= ps_sps->i2_pic_crop_right_offset * crop_unit_x; in ihevcd_parse_sps()
1903 disp_ht = ps_sps->i2_pic_height_in_luma_samples; in ihevcd_parse_sps()
1904 disp_ht -= ps_sps->i2_pic_crop_top_offset * crop_unit_y; in ihevcd_parse_sps()
1905 disp_ht -= ps_sps->i2_pic_crop_bottom_offset * crop_unit_y; in ihevcd_parse_sps()
1926 ps_codec->i4_wd = ps_sps->i2_pic_width_in_luma_samples; in ihevcd_parse_sps()
1927 ps_codec->i4_ht = ps_sps->i2_pic_height_in_luma_samples; in ihevcd_parse_sps()
1931 ref_strd = ALIGN32(ps_sps->i2_pic_width_in_luma_samples + PAD_WD); in ihevcd_parse_sps()
1978 sps_t *ps_sps, *ps_sps_ref; in ihevcd_copy_sps() local
1984 ps_sps = ps_codec->ps_sps_base + sps_id; in ihevcd_copy_sps()
1986 if(ps_sps->i1_sps_valid) in ihevcd_copy_sps()
1988 if((ps_sps->i1_log2_ctb_size != ps_sps_ref->i1_log2_ctb_size) || in ihevcd_copy_sps()
1989 (ps_sps->i2_pic_wd_in_ctb != ps_sps_ref->i2_pic_wd_in_ctb) || in ihevcd_copy_sps()
1990 (ps_sps->i2_pic_ht_in_ctb != ps_sps_ref->i2_pic_ht_in_ctb)) in ihevcd_copy_sps()
1996 pi2_scaling_mat_backup = ps_sps->pi2_scaling_mat; in ihevcd_copy_sps()
1998 memcpy(ps_sps, ps_sps_ref, sizeof(sps_t)); in ihevcd_copy_sps()
1999 ps_sps->pi2_scaling_mat = pi2_scaling_mat_backup; in ihevcd_copy_sps()
2000 memcpy(ps_sps->pi2_scaling_mat, ps_sps_ref->pi2_scaling_mat, scaling_mat_size * sizeof(WORD16)); in ihevcd_copy_sps()
2001 ps_sps->i1_sps_valid = 1; in ihevcd_copy_sps()
2003 ps_codec->s_parse.ps_sps = ps_sps; in ihevcd_copy_sps()
2036 sps_t *ps_sps; in ihevcd_parse_pps() local
2066 ps_sps = (ps_codec->s_parse.ps_sps_base + ps_pps->i1_sps_id); in ihevcd_parse_pps()
2070 if(0 == ps_sps->i1_sps_valid) in ihevcd_parse_pps()
2131 if(value > ps_sps->i1_log2_diff_max_min_coding_block_size) in ihevcd_parse_pps()
2141 …ps_pps->i1_log2_min_cu_qp_delta_size = ps_sps->i1_log2_ctb_size - ps_pps->i1_diff_cu_qp_delta_dept… in ihevcd_parse_pps()
2183 if((ps_sps->i1_log2_ctb_size == 4) && in ihevcd_parse_pps()
2184 ((ps_sps->i2_pic_width_in_luma_samples >= 4096) || in ihevcd_parse_pps()
2185 (ps_sps->i2_pic_height_in_luma_samples >= 4096))) in ihevcd_parse_pps()
2189 if((ps_sps->i1_log2_ctb_size == 5) && in ihevcd_parse_pps()
2190 ((ps_sps->i2_pic_width_in_luma_samples >= 8192) || in ihevcd_parse_pps()
2191 (ps_sps->i2_pic_height_in_luma_samples >= 8192))) in ihevcd_parse_pps()
2195 if((ps_sps->i1_log2_ctb_size == 6) && in ihevcd_parse_pps()
2196 ((ps_sps->i2_pic_width_in_luma_samples >= 16384) || in ihevcd_parse_pps()
2197 (ps_sps->i2_pic_height_in_luma_samples >= 16384))) in ihevcd_parse_pps()
2247 if (value >= ps_sps->i2_pic_wd_in_ctb - start) in ihevcd_parse_pps()
2254 value = ps_sps->i2_pic_wd_in_ctb - start; in ihevcd_parse_pps()
2259 value = ((i + 1) * ps_sps->i2_pic_wd_in_ctb) / ps_pps->i1_num_tile_columns - in ihevcd_parse_pps()
2260 (i * ps_sps->i2_pic_wd_in_ctb) / ps_pps->i1_num_tile_columns; in ihevcd_parse_pps()
2271 if((start > ps_sps->i2_pic_wd_in_ctb) || in ihevcd_parse_pps()
2287 if (value >= ps_sps->i2_pic_ht_in_ctb - start) in ihevcd_parse_pps()
2294 value = ps_sps->i2_pic_ht_in_ctb - start; in ihevcd_parse_pps()
2299 value = ((i + 1) * ps_sps->i2_pic_ht_in_ctb) / ps_pps->i1_num_tile_rows - in ihevcd_parse_pps()
2300 (i * ps_sps->i2_pic_ht_in_ctb) / ps_pps->i1_num_tile_rows; in ihevcd_parse_pps()
2311 if((start > ps_sps->i2_pic_ht_in_ctb) || in ihevcd_parse_pps()
2332 ps_pps->ps_tile->u2_wd = ps_sps->i2_pic_wd_in_ctb; in ihevcd_parse_pps()
2333 ps_pps->ps_tile->u2_ht = ps_sps->i2_pic_ht_in_ctb; in ihevcd_parse_pps()
2389 …if(value > (ps_sps->i1_log2_min_coding_block_size + ps_sps->i1_log2_diff_max_min_coding_block_size… in ihevcd_parse_pps()
2442 sps_t *ps_sps) in ihevcd_parse_buffering_period_sei() argument
2453 ps_vui = &ps_sps->s_vui_parameters; in ihevcd_parse_buffering_period_sei()
2596 IHEVCD_ERROR_T ihevcd_parse_pic_timing_sei(codec_t *ps_codec, sps_t *ps_sps) in ihevcd_parse_pic_timing_sei() argument
2608 ps_vui = &ps_sps->s_vui_parameters; in ihevcd_parse_pic_timing_sei()
2657 if(value > (ps_sps->i4_pic_size_in_ctb -1)) in ihevcd_parse_pic_timing_sei()
2686 if(value > (ps_sps->i4_pic_size_in_ctb -1)) in ihevcd_parse_pic_timing_sei()
2906 sps_t *ps_sps; in ihevcd_parse_sei_payload() local
2912 ps_sps = ps_codec->ps_sps_base + i; in ihevcd_parse_sei_payload()
2913 if(ps_sps->i1_sps_valid) in ihevcd_parse_sei_payload()
2918 if(!ps_sps->i1_sps_valid) in ihevcd_parse_sei_payload()
2929 ihevcd_parse_buffering_period_sei(ps_codec, ps_sps); in ihevcd_parse_sei_payload()
2934 ihevcd_parse_pic_timing_sei(ps_codec, ps_sps); in ihevcd_parse_sei_payload()