Lines Matching refs:sps
177 GstH264SPS *sps; in gst_h264_parser_get_sps() local
179 sps = &nalparser->sps[sps_id]; in gst_h264_parser_get_sps()
181 if (sps->valid) in gst_h264_parser_get_sps()
182 return sps; in gst_h264_parser_get_sps()
420 gst_h264_parse_vui_parameters (GstH264SPS * sps, NalReader * nr) in gst_h264_parse_vui_parameters() argument
422 GstH264VUIParams *vui = &sps->vui_parameters; in gst_h264_parse_vui_parameters()
862 GstH264SPS *sps; in gst_h264_parser_parse_buffering_period() local
868 sps = gst_h264_parser_get_sps (nalparser, sps_id); in gst_h264_parser_parse_buffering_period()
869 if (!sps) { in gst_h264_parser_parse_buffering_period()
874 per->sps = sps; in gst_h264_parser_parse_buffering_period()
876 if (sps->vui_parameters_present_flag) { in gst_h264_parser_parse_buffering_period()
877 GstH264VUIParams *vui = &sps->vui_parameters; in gst_h264_parser_parse_buffering_period()
1095 GstH264SPS *const sps = nalparser->last_sps; in gst_h264_parser_parse_recovery_point() local
1098 if (!sps || !sps->valid) { in gst_h264_parser_parse_recovery_point()
1104 READ_UE_MAX (nr, rp->recovery_frame_cnt, sps->max_frame_num - 1); in gst_h264_parser_parse_recovery_point()
1406 gst_h264_sps_clear (&nalparser->sps[i]); in gst_h264_nal_parser_free()
1622 GstH264SPS sps; in gst_h264_parser_parse_nal() local
1627 return gst_h264_parser_parse_sps (nalparser, nalu, &sps); in gst_h264_parser_parse_nal()
1648 GstH264SPS * sps) in gst_h264_parser_parse_sps() argument
1650 GstH264ParserResult res = gst_h264_parse_sps (nalu, sps); in gst_h264_parser_parse_sps()
1653 GST_DEBUG ("adding sequence parameter set with id: %d to array", sps->id); in gst_h264_parser_parse_sps()
1655 if (!gst_h264_sps_copy (&nalparser->sps[sps->id], sps)) in gst_h264_parser_parse_sps()
1657 nalparser->last_sps = &nalparser->sps[sps->id]; in gst_h264_parser_parse_sps()
1664 gst_h264_parse_sps_data (NalReader * nr, GstH264SPS * sps) in gst_h264_parse_sps_data() argument
1670 memset (sps, 0, sizeof (*sps)); in gst_h264_parse_sps_data()
1674 sps->extension_type = GST_H264_NAL_EXTENSION_NONE; in gst_h264_parse_sps_data()
1675 sps->chroma_format_idc = 1; in gst_h264_parse_sps_data()
1676 memset (sps->scaling_lists_4x4, 16, 96); in gst_h264_parse_sps_data()
1677 memset (sps->scaling_lists_8x8, 16, 384); in gst_h264_parse_sps_data()
1679 READ_UINT8 (nr, sps->profile_idc, 8); in gst_h264_parse_sps_data()
1680 READ_UINT8 (nr, sps->constraint_set0_flag, 1); in gst_h264_parse_sps_data()
1681 READ_UINT8 (nr, sps->constraint_set1_flag, 1); in gst_h264_parse_sps_data()
1682 READ_UINT8 (nr, sps->constraint_set2_flag, 1); in gst_h264_parse_sps_data()
1683 READ_UINT8 (nr, sps->constraint_set3_flag, 1); in gst_h264_parse_sps_data()
1684 READ_UINT8 (nr, sps->constraint_set4_flag, 1); in gst_h264_parse_sps_data()
1685 READ_UINT8 (nr, sps->constraint_set5_flag, 1); in gst_h264_parse_sps_data()
1691 READ_UINT8 (nr, sps->level_idc, 8); in gst_h264_parse_sps_data()
1693 READ_UE_MAX (nr, sps->id, GST_H264_MAX_SPS_COUNT - 1); in gst_h264_parse_sps_data()
1695 if (sps->profile_idc == 100 || sps->profile_idc == 110 || in gst_h264_parse_sps_data()
1696 sps->profile_idc == 122 || sps->profile_idc == 244 || in gst_h264_parse_sps_data()
1697 sps->profile_idc == 44 || sps->profile_idc == 83 || in gst_h264_parse_sps_data()
1698 sps->profile_idc == 86 || sps->profile_idc == 118 || in gst_h264_parse_sps_data()
1699 sps->profile_idc == 128 || sps->profile_idc == 138 || in gst_h264_parse_sps_data()
1700 sps->profile_idc == 139 || sps->profile_idc == 134 || in gst_h264_parse_sps_data()
1701 sps->profile_idc == 135) { in gst_h264_parse_sps_data()
1702 READ_UE_MAX (nr, sps->chroma_format_idc, 3); in gst_h264_parse_sps_data()
1703 if (sps->chroma_format_idc == 3) in gst_h264_parse_sps_data()
1704 READ_UINT8 (nr, sps->separate_colour_plane_flag, 1); in gst_h264_parse_sps_data()
1706 READ_UE_MAX (nr, sps->bit_depth_luma_minus8, 6); in gst_h264_parse_sps_data()
1707 READ_UE_MAX (nr, sps->bit_depth_chroma_minus8, 6); in gst_h264_parse_sps_data()
1708 READ_UINT8 (nr, sps->qpprime_y_zero_transform_bypass_flag, 1); in gst_h264_parse_sps_data()
1710 READ_UINT8 (nr, sps->scaling_matrix_present_flag, 1); in gst_h264_parse_sps_data()
1711 if (sps->scaling_matrix_present_flag) { in gst_h264_parse_sps_data()
1714 n_lists = (sps->chroma_format_idc != 3) ? 8 : 12; in gst_h264_parse_sps_data()
1716 sps->scaling_lists_4x4, sps->scaling_lists_8x8, in gst_h264_parse_sps_data()
1723 READ_UE_MAX (nr, sps->log2_max_frame_num_minus4, 12); in gst_h264_parse_sps_data()
1725 sps->max_frame_num = 1 << (sps->log2_max_frame_num_minus4 + 4); in gst_h264_parse_sps_data()
1727 READ_UE_MAX (nr, sps->pic_order_cnt_type, 2); in gst_h264_parse_sps_data()
1728 if (sps->pic_order_cnt_type == 0) { in gst_h264_parse_sps_data()
1729 READ_UE_MAX (nr, sps->log2_max_pic_order_cnt_lsb_minus4, 12); in gst_h264_parse_sps_data()
1730 } else if (sps->pic_order_cnt_type == 1) { in gst_h264_parse_sps_data()
1733 READ_UINT8 (nr, sps->delta_pic_order_always_zero_flag, 1); in gst_h264_parse_sps_data()
1734 READ_SE (nr, sps->offset_for_non_ref_pic); in gst_h264_parse_sps_data()
1735 READ_SE (nr, sps->offset_for_top_to_bottom_field); in gst_h264_parse_sps_data()
1736 READ_UE_MAX (nr, sps->num_ref_frames_in_pic_order_cnt_cycle, 255); in gst_h264_parse_sps_data()
1738 for (i = 0; i < sps->num_ref_frames_in_pic_order_cnt_cycle; i++) in gst_h264_parse_sps_data()
1739 READ_SE (nr, sps->offset_for_ref_frame[i]); in gst_h264_parse_sps_data()
1742 READ_UE (nr, sps->num_ref_frames); in gst_h264_parse_sps_data()
1743 READ_UINT8 (nr, sps->gaps_in_frame_num_value_allowed_flag, 1); in gst_h264_parse_sps_data()
1744 READ_UE (nr, sps->pic_width_in_mbs_minus1); in gst_h264_parse_sps_data()
1745 READ_UE (nr, sps->pic_height_in_map_units_minus1); in gst_h264_parse_sps_data()
1746 READ_UINT8 (nr, sps->frame_mbs_only_flag, 1); in gst_h264_parse_sps_data()
1748 if (!sps->frame_mbs_only_flag) in gst_h264_parse_sps_data()
1749 READ_UINT8 (nr, sps->mb_adaptive_frame_field_flag, 1); in gst_h264_parse_sps_data()
1751 READ_UINT8 (nr, sps->direct_8x8_inference_flag, 1); in gst_h264_parse_sps_data()
1752 READ_UINT8 (nr, sps->frame_cropping_flag, 1); in gst_h264_parse_sps_data()
1753 if (sps->frame_cropping_flag) { in gst_h264_parse_sps_data()
1754 READ_UE (nr, sps->frame_crop_left_offset); in gst_h264_parse_sps_data()
1755 READ_UE (nr, sps->frame_crop_right_offset); in gst_h264_parse_sps_data()
1756 READ_UE (nr, sps->frame_crop_top_offset); in gst_h264_parse_sps_data()
1757 READ_UE (nr, sps->frame_crop_bottom_offset); in gst_h264_parse_sps_data()
1760 READ_UINT8 (nr, sps->vui_parameters_present_flag, 1); in gst_h264_parse_sps_data()
1761 if (sps->vui_parameters_present_flag) in gst_h264_parse_sps_data()
1762 if (!gst_h264_parse_vui_parameters (sps, nr)) in gst_h264_parse_sps_data()
1766 if (!sps->separate_colour_plane_flag) in gst_h264_parse_sps_data()
1767 sps->chroma_array_type = sps->chroma_format_idc; in gst_h264_parse_sps_data()
1770 width = (sps->pic_width_in_mbs_minus1 + 1); in gst_h264_parse_sps_data()
1772 height = (sps->pic_height_in_map_units_minus1 + 1); in gst_h264_parse_sps_data()
1773 height *= 16 * (2 - sps->frame_mbs_only_flag); in gst_h264_parse_sps_data()
1780 sps->width = width; in gst_h264_parse_sps_data()
1781 sps->height = height; in gst_h264_parse_sps_data()
1783 if (sps->frame_cropping_flag) { in gst_h264_parse_sps_data()
1784 const guint crop_unit_x = subwc[sps->chroma_format_idc]; in gst_h264_parse_sps_data()
1786 subhc[sps->chroma_format_idc] * (2 - sps->frame_mbs_only_flag); in gst_h264_parse_sps_data()
1788 width -= (sps->frame_crop_left_offset + sps->frame_crop_right_offset) in gst_h264_parse_sps_data()
1790 height -= (sps->frame_crop_top_offset + sps->frame_crop_bottom_offset) in gst_h264_parse_sps_data()
1793 sps->crop_rect_width = width; in gst_h264_parse_sps_data()
1794 sps->crop_rect_height = height; in gst_h264_parse_sps_data()
1795 sps->crop_rect_x = sps->frame_crop_left_offset * crop_unit_x; in gst_h264_parse_sps_data()
1796 sps->crop_rect_y = sps->frame_crop_top_offset * crop_unit_y; in gst_h264_parse_sps_data()
1798 GST_LOG ("crop_rectangle x=%u y=%u width=%u, height=%u", sps->crop_rect_x, in gst_h264_parse_sps_data()
1799 sps->crop_rect_y, width, height); in gst_h264_parse_sps_data()
1802 sps->fps_num_removed = 0; in gst_h264_parse_sps_data()
1803 sps->fps_den_removed = 1; in gst_h264_parse_sps_data()
1813 gst_h264_parse_sps_mvc_data (NalReader * nr, GstH264SPS * sps) in gst_h264_parse_sps_mvc_data() argument
1815 GstH264SPSExtMVC *const mvc = &sps->extension.mvc; in gst_h264_parse_sps_mvc_data()
1823 sps->extension_type = GST_H264_NAL_EXTENSION_MVC; in gst_h264_parse_sps_mvc_data()
1901 gst_h264_sps_clear (sps); in gst_h264_parse_sps_mvc_data()
1905 gst_h264_sps_clear (sps); in gst_h264_parse_sps_mvc_data()
1919 gst_h264_parse_sps (GstH264NalUnit * nalu, GstH264SPS * sps) in gst_h264_parse_sps() argument
1928 if (!gst_h264_parse_sps_data (&nr, sps)) in gst_h264_parse_sps()
1931 sps->valid = TRUE; in gst_h264_parse_sps()
1937 sps->valid = FALSE; in gst_h264_parse_sps()
1964 GstH264NalUnit * nalu, GstH264SPS * sps) in gst_h264_parser_parse_subset_sps() argument
1968 res = gst_h264_parse_subset_sps (nalu, sps); in gst_h264_parser_parse_subset_sps()
1970 GST_DEBUG ("adding sequence parameter set with id: %d to array", sps->id); in gst_h264_parser_parse_subset_sps()
1972 if (!gst_h264_sps_copy (&nalparser->sps[sps->id], sps)) { in gst_h264_parser_parse_subset_sps()
1973 gst_h264_sps_clear (sps); in gst_h264_parser_parse_subset_sps()
1976 nalparser->last_sps = &nalparser->sps[sps->id]; in gst_h264_parser_parse_subset_sps()
2002 gst_h264_parse_subset_sps (GstH264NalUnit * nalu, GstH264SPS * sps) in gst_h264_parse_subset_sps() argument
2011 if (!gst_h264_parse_sps_data (&nr, sps)) in gst_h264_parse_subset_sps()
2014 if (sps->profile_idc == GST_H264_PROFILE_MULTIVIEW_HIGH || in gst_h264_parse_subset_sps()
2015 sps->profile_idc == GST_H264_PROFILE_STEREO_HIGH) { in gst_h264_parse_subset_sps()
2016 if (!gst_h264_parse_sps_mvc_data (&nr, sps)) in gst_h264_parse_subset_sps()
2020 sps->valid = TRUE; in gst_h264_parse_subset_sps()
2025 gst_h264_sps_clear (sps); in gst_h264_parse_subset_sps()
2026 sps->valid = FALSE; in gst_h264_parse_subset_sps()
2049 GstH264SPS *sps; in gst_h264_parse_pps() local
2063 sps = gst_h264_parser_get_sps (nalparser, sps_id); in gst_h264_parse_pps()
2064 if (!sps) { in gst_h264_parse_pps()
2069 pps->sequence = sps; in gst_h264_parse_pps()
2070 qp_bd_offset = 6 * (sps->bit_depth_luma_minus8 + in gst_h264_parse_pps()
2071 sps->separate_colour_plane_flag); in gst_h264_parse_pps()
2075 memcpy (&pps->scaling_lists_4x4, &sps->scaling_lists_4x4, 96); in gst_h264_parse_pps()
2076 memcpy (&pps->scaling_lists_8x8, &sps->scaling_lists_8x8, 384); in gst_h264_parse_pps()
2134 n_lists = 6 + ((sps->chroma_format_idc != 3) ? 2 : 6) * in gst_h264_parse_pps()
2137 if (sps->scaling_matrix_present_flag) { in gst_h264_parse_pps()
2140 sps->scaling_lists_4x4[3], sps->scaling_lists_4x4[0], in gst_h264_parse_pps()
2141 sps->scaling_lists_8x8[3], sps->scaling_lists_8x8[0], n_lists)) in gst_h264_parse_pps()
2232 GstH264SPS *sps; in gst_h264_parser_parse_slice_hdr() local
2261 sps = pps->sequence; in gst_h264_parser_parse_slice_hdr()
2262 if (!sps) { in gst_h264_parser_parse_slice_hdr()
2269 if (sps->extension_type && sps->extension_type != GST_H264_NAL_EXTENSION_MVC) { in gst_h264_parser_parse_slice_hdr()
2288 if (sps->separate_colour_plane_flag) in gst_h264_parser_parse_slice_hdr()
2291 READ_UINT16 (&nr, slice->frame_num, sps->log2_max_frame_num_minus4 + 4); in gst_h264_parser_parse_slice_hdr()
2293 if (!sps->frame_mbs_only_flag) { in gst_h264_parser_parse_slice_hdr()
2301 slice->max_pic_num = 2 * sps->max_frame_num; in gst_h264_parser_parse_slice_hdr()
2303 slice->max_pic_num = sps->max_frame_num; in gst_h264_parser_parse_slice_hdr()
2311 if (sps->pic_order_cnt_type == 0) { in gst_h264_parser_parse_slice_hdr()
2313 sps->log2_max_pic_order_cnt_lsb_minus4 + 4); in gst_h264_parser_parse_slice_hdr()
2319 if (sps->pic_order_cnt_type == 1 && !sps->delta_pic_order_always_zero_flag) { in gst_h264_parser_parse_slice_hdr()
2353 sps->chroma_array_type)) in gst_h264_parser_parse_slice_hdr()
2385 guint32 PicWidthInMbs = sps->pic_width_in_mbs_minus1 + 1; in gst_h264_parser_parse_slice_hdr()
2386 guint32 PicHeightInMapUnits = sps->pic_height_in_map_units_minus1 + 1; in gst_h264_parser_parse_slice_hdr()
2405 gst_h264_sps_mvc_clear (GstH264SPS * sps) in gst_h264_sps_mvc_clear() argument
2407 GstH264SPSExtMVC *const mvc = &sps->extension.mvc; in gst_h264_sps_mvc_clear()
2410 g_assert (sps->extension_type == GST_H264_NAL_EXTENSION_MVC); in gst_h264_sps_mvc_clear()
2430 sps->extension_type = GST_H264_NAL_EXTENSION_NONE; in gst_h264_sps_mvc_clear()
2442 gst_h264_sps_clear (GstH264SPS * sps) in gst_h264_sps_clear() argument
2444 g_return_if_fail (sps != NULL); in gst_h264_sps_clear()
2446 switch (sps->extension_type) { in gst_h264_sps_clear()
2448 gst_h264_sps_mvc_clear (sps); in gst_h264_sps_clear()
2534 gst_h264_parser_update_sps (GstH264NalParser * nalparser, GstH264SPS * sps) in gst_h264_parser_update_sps() argument
2537 g_return_val_if_fail (sps != NULL, GST_H264_PARSER_ERROR); in gst_h264_parser_update_sps()
2538 g_return_val_if_fail (sps->id >= 0 && sps->id < GST_H264_MAX_SPS_COUNT, in gst_h264_parser_update_sps()
2541 if (!sps->valid) { in gst_h264_parser_update_sps()
2546 GST_DEBUG ("Updating sequence parameter set with id: %d", sps->id); in gst_h264_parser_update_sps()
2548 if (!gst_h264_sps_copy (&nalparser->sps[sps->id], sps)) in gst_h264_parser_update_sps()
2551 nalparser->last_sps = &nalparser->sps[sps->id]; in gst_h264_parser_update_sps()
2571 GstH264SPS *sps; in gst_h264_parser_update_pps() local
2588 sps = gst_h264_parser_get_sps (nalparser, pps->sequence->id); in gst_h264_parser_update_pps()
2589 if (!sps || sps != pps->sequence) { in gst_h264_parser_update_pps()
2720 gst_h264_video_calculate_framerate (const GstH264SPS * sps, in gst_h264_video_calculate_framerate() argument
2734 if (sps) { in gst_h264_video_calculate_framerate()
2735 if (sps->vui_parameters_present_flag) { in gst_h264_video_calculate_framerate()
2736 const GstH264VUIParams *vui = &sps->vui_parameters; in gst_h264_video_calculate_framerate()