Lines Matching refs:ps_sps

237 WORD32 ih264e_generate_sps(bitstrm_t *ps_bitstrm, sps_t *ps_sps, vui_t *ps_vui)  in ih264e_generate_sps()  argument
251 PUT_BITS(ps_bitstrm, ps_sps->u1_profile_idc, 8, return_status, "profile_idc"); in ih264e_generate_sps()
254 … PUT_BITS(ps_bitstrm, ps_sps->u1_constraint_set0_flag, 1, return_status, "constrained_set0_flag"); in ih264e_generate_sps()
255 … PUT_BITS(ps_bitstrm, ps_sps->u1_constraint_set1_flag, 1, return_status, "constrained_set1_flag"); in ih264e_generate_sps()
256 … PUT_BITS(ps_bitstrm, ps_sps->u1_constraint_set2_flag, 1, return_status, "constrained_set2_flag"); in ih264e_generate_sps()
257 … PUT_BITS(ps_bitstrm, ps_sps->u1_constraint_set3_flag, 1, return_status, "constrained_set3_flag"); in ih264e_generate_sps()
263 PUT_BITS(ps_bitstrm, ps_sps->u1_level_idc, 8, return_status, "level_idc"); in ih264e_generate_sps()
266 PUT_BITS_UEV(ps_bitstrm, ps_sps->u1_sps_id, return_status, "seq_parameter_set_id"); in ih264e_generate_sps()
268 if (ps_sps->u1_profile_idc >= IH264_PROFILE_HIGH) in ih264e_generate_sps()
271 PUT_BITS_UEV(ps_bitstrm, ps_sps->u1_chroma_format_idc, return_status, "chroma_format_idc"); in ih264e_generate_sps()
273 if (ps_sps->u1_chroma_format_idc == CHROMA_FMT_IDC_YUV444) in ih264e_generate_sps()
276 …PUT_BITS(ps_bitstrm, ps_sps->i1_residual_colour_transform_flag, 1, return_status, "i1_residual_col… in ih264e_generate_sps()
280 … PUT_BITS_UEV(ps_bitstrm, (ps_sps->i1_bit_depth_luma - 8), return_status, "bit_depth_luma_minus8"); in ih264e_generate_sps()
283 …PUT_BITS_UEV(ps_bitstrm, (ps_sps->i1_bit_depth_chroma - 8), return_status, "bit_depth_chroma_minus… in ih264e_generate_sps()
286 …PUT_BITS(ps_bitstrm, ps_sps->i1_qpprime_y_zero_transform_bypass_flag, 1, return_status, "qpprime_y… in ih264e_generate_sps()
289 …PUT_BITS(ps_bitstrm, ps_sps->i1_seq_scaling_matrix_present_flag, 1, return_status, "seq_scaling_ma… in ih264e_generate_sps()
292 if (ps_sps->i1_seq_scaling_matrix_present_flag) in ih264e_generate_sps()
299 …PUT_BITS_UEV(ps_bitstrm, (ps_sps->i1_log2_max_frame_num - 4), return_status, "log2_max_frame_num_m… in ih264e_generate_sps()
302 PUT_BITS_UEV(ps_bitstrm, ps_sps->i1_pic_order_cnt_type, return_status, "pic_order_cnt_type"); in ih264e_generate_sps()
304 if (ps_sps->i1_pic_order_cnt_type == 0) in ih264e_generate_sps()
307 …PUT_BITS_UEV(ps_bitstrm, (ps_sps->i1_log2_max_pic_order_cnt_lsb - 4), return_status, "log2_max_pic… in ih264e_generate_sps()
309 else if (ps_sps->i1_pic_order_cnt_type == 1) in ih264e_generate_sps()
312 …PUT_BITS(ps_bitstrm, ps_sps->i1_delta_pic_order_always_zero_flag, 1, return_status, "delta_pic_ord… in ih264e_generate_sps()
315 …PUT_BITS_SEV(ps_bitstrm, ps_sps->i4_offset_for_non_ref_pic, return_status, "offset_for_non_ref_pic… in ih264e_generate_sps()
318 …PUT_BITS_SEV(ps_bitstrm, ps_sps->i4_offset_for_top_to_bottom_field, return_status, "offset_for_top… in ih264e_generate_sps()
321 …PUT_BITS_UEV(ps_bitstrm, ps_sps->u1_num_ref_frames_in_pic_order_cnt_cycle, return_status, "num_ref… in ih264e_generate_sps()
324 for (i=0; i<ps_sps->u1_num_ref_frames_in_pic_order_cnt_cycle; i++) in ih264e_generate_sps()
327 …PUT_BITS_SEV(ps_bitstrm, ps_sps->ai4_offset_for_ref_frame[i], return_status, "offset_for_ref_frame… in ih264e_generate_sps()
332 PUT_BITS_UEV(ps_bitstrm, ps_sps->u1_max_num_ref_frames, return_status, "num_ref_frames"); in ih264e_generate_sps()
335 …PUT_BITS(ps_bitstrm, ps_sps->i1_gaps_in_frame_num_value_allowed_flag, 1, return_status, "gaps_in_f… in ih264e_generate_sps()
338 …PUT_BITS_UEV(ps_bitstrm, ps_sps->i2_pic_width_in_mbs_minus1, return_status, "pic_width_in_mbs_minu… in ih264e_generate_sps()
341 …PUT_BITS_UEV(ps_bitstrm, ps_sps->i2_pic_height_in_map_units_minus1, return_status, "pic_height_in_… in ih264e_generate_sps()
344 PUT_BITS(ps_bitstrm, ps_sps->i1_frame_mbs_only_flag, 1, return_status, "frame_mbs_only_flag"); in ih264e_generate_sps()
346 if (!ps_sps->i1_frame_mbs_only_flag) in ih264e_generate_sps()
349 …PUT_BITS(ps_bitstrm, ps_sps->i1_mb_adaptive_frame_field_flag, 1, return_status, "mb_adaptive_frame… in ih264e_generate_sps()
353 …PUT_BITS(ps_bitstrm, ps_sps->i1_direct_8x8_inference_flag, 1, return_status, "direct_8x8_inference… in ih264e_generate_sps()
356 PUT_BITS(ps_bitstrm, ps_sps->i1_frame_cropping_flag, 1, return_status, "frame_cropping_flag"); in ih264e_generate_sps()
358 if (ps_sps->i1_frame_cropping_flag) in ih264e_generate_sps()
361 …PUT_BITS_UEV(ps_bitstrm, ps_sps->i2_frame_crop_left_offset, return_status, "frame_crop_left_offset… in ih264e_generate_sps()
364 …PUT_BITS_UEV(ps_bitstrm, ps_sps->i2_frame_crop_right_offset, return_status, "frame_crop_right_offs… in ih264e_generate_sps()
367 …PUT_BITS_UEV(ps_bitstrm, ps_sps->i2_frame_crop_top_offset, return_status, "frame_crop_top_offset"); in ih264e_generate_sps()
370 …PUT_BITS_UEV(ps_bitstrm, ps_sps->i2_frame_crop_bottom_offset, return_status, "frame_crop_bottom_of… in ih264e_generate_sps()
374 …PUT_BITS(ps_bitstrm, ps_sps->i1_vui_parameters_present_flag, 1, return_status, "vui_parameters_pre… in ih264e_generate_sps()
376 if (ps_sps->i1_vui_parameters_present_flag) in ih264e_generate_sps()
406 WORD32 ih264e_generate_pps(bitstrm_t *ps_bitstrm, pps_t *ps_pps, sps_t *ps_sps) in ih264e_generate_pps() argument
467 if (ps_sps->u1_profile_idc >= IH264_PROFILE_HIGH) in ih264e_generate_pps()
522 sps_t *ps_sps) in ih264e_generate_slice_header() argument
543 …PUT_BITS(ps_bitstrm, ps_slice_hdr->i4_frame_num, ps_sps->i1_log2_max_frame_num, return_status, "fr… in ih264e_generate_slice_header()
545 if (!ps_sps->i1_frame_mbs_only_flag) in ih264e_generate_slice_header()
563 if (ps_sps->i1_pic_order_cnt_type == 0) in ih264e_generate_slice_header()
566 …PUT_BITS(ps_bitstrm, ps_slice_hdr->i4_pic_order_cnt_lsb, ps_sps->i1_log2_max_pic_order_cnt_lsb, re… in ih264e_generate_slice_header()
575 if (ps_sps->i1_pic_order_cnt_type == 1 && !ps_sps->i1_delta_pic_order_always_zero_flag) in ih264e_generate_slice_header()
740 sps_t *ps_sps; in ih264e_populate_vui() local
742 ps_sps = ps_codec->ps_sps_base + ps_codec->i4_sps_id; in ih264e_populate_vui()
767 ps_vui->u1_max_dec_frame_buffering = ps_sps->u1_max_num_ref_frames; in ih264e_populate_vui()
792 IH264E_ERROR_T ih264e_populate_sps(codec_t *ps_codec, sps_t *ps_sps) in ih264e_populate_sps() argument
814 ps_sps->u1_profile_idc = IH264_PROFILE_MAIN; in ih264e_populate_sps()
818 ps_sps->u1_profile_idc = IH264_PROFILE_BASELINE; in ih264e_populate_sps()
822 ps_sps->u1_level_idc = MAX(ps_cfg->u4_max_level, in ih264e_populate_sps()
829 ps_sps->u1_constraint_set0_flag = (ps_sps->u1_profile_idc == IH264_PROFILE_BASELINE); in ih264e_populate_sps()
835 ps_sps->u1_constraint_set1_flag = (ps_sps->u1_profile_idc <= IH264_PROFILE_MAIN); in ih264e_populate_sps()
839 ps_sps->u1_constraint_set2_flag = 0x00; in ih264e_populate_sps()
843 if (ps_sps->u1_level_idc == IH264_LEVEL_1B) in ih264e_populate_sps()
845 ps_sps->u1_constraint_set3_flag = 0; in ih264e_populate_sps()
846 ps_sps->u1_level_idc = IH264_LEVEL_11; in ih264e_populate_sps()
850 ps_sps->u1_constraint_set3_flag = 0; in ih264e_populate_sps()
854 ps_sps->u1_sps_id = ps_codec->i4_sps_id; in ih264e_populate_sps()
856 if (ps_sps->u1_profile_idc >= IH264_PROFILE_HIGH) in ih264e_populate_sps()
859 ps_sps->u1_chroma_format_idc = CHROMA_FMT_IDC_YUV420; in ih264e_populate_sps()
862 ps_sps->i1_residual_colour_transform_flag = 0; in ih264e_populate_sps()
865 ps_sps->i1_bit_depth_luma = 8; in ih264e_populate_sps()
868 ps_sps->i1_bit_depth_chroma = 8; in ih264e_populate_sps()
871 ps_sps->i1_qpprime_y_zero_transform_bypass_flag = 0; in ih264e_populate_sps()
874 ps_sps->i1_seq_scaling_matrix_present_flag = 0; in ih264e_populate_sps()
876 if (ps_sps->i1_seq_scaling_matrix_present_flag) in ih264e_populate_sps()
883 ps_sps->i1_log2_max_frame_num = 16; in ih264e_populate_sps()
886 ps_sps->i1_pic_order_cnt_type = 2; in ih264e_populate_sps()
890 ps_sps->i1_pic_order_cnt_type = 0; in ih264e_populate_sps()
894 ps_sps->i1_log2_max_pic_order_cnt_lsb = 8; in ih264e_populate_sps()
897 if (ps_sps->i1_pic_order_cnt_type == 0) in ih264e_populate_sps()
901 else if (ps_sps->i1_pic_order_cnt_type == 1) in ih264e_populate_sps()
910 ps_sps->u1_max_num_ref_frames = 2; in ih264e_populate_sps()
914 ps_sps->u1_max_num_ref_frames = 1; in ih264e_populate_sps()
918 ps_sps->i1_gaps_in_frame_num_value_allowed_flag = 0; in ih264e_populate_sps()
921 ps_sps->i2_pic_width_in_mbs_minus1 = ps_cfg->i4_wd_mbs - 1; in ih264e_populate_sps()
924 ps_sps->i2_pic_height_in_map_units_minus1 = ps_cfg->i4_ht_mbs - 1;; in ih264e_populate_sps()
927 ps_sps->i1_frame_mbs_only_flag = 1; in ih264e_populate_sps()
930 if (ps_sps->i1_frame_mbs_only_flag == 0) in ih264e_populate_sps()
932 ps_sps->i1_mb_adaptive_frame_field_flag = 0; in ih264e_populate_sps()
936 ps_sps->i1_direct_8x8_inference_flag = 0; in ih264e_populate_sps()
944 ps_sps->i1_frame_cropping_flag = 0; in ih264e_populate_sps()
945 ps_sps->i2_frame_crop_left_offset = 0; in ih264e_populate_sps()
946 ps_sps->i2_frame_crop_right_offset = (ps_codec->s_cfg.u4_wd - ps_codec->s_cfg.u4_disp_wd)>>1; in ih264e_populate_sps()
947 ps_sps->i2_frame_crop_top_offset = 0; in ih264e_populate_sps()
948 ps_sps->i2_frame_crop_bottom_offset = (ps_codec->s_cfg.u4_ht - ps_codec->s_cfg.u4_disp_ht)>>1; in ih264e_populate_sps()
950 if (ps_sps->i2_frame_crop_left_offset || in ih264e_populate_sps()
951 ps_sps->i2_frame_crop_right_offset || in ih264e_populate_sps()
952 ps_sps->i2_frame_crop_top_offset || in ih264e_populate_sps()
953 ps_sps->i2_frame_crop_bottom_offset) in ih264e_populate_sps()
955 ps_sps->i1_frame_cropping_flag = 1; in ih264e_populate_sps()
959 ps_sps->i1_vui_parameters_present_flag = 1; in ih264e_populate_sps()
961 if (ps_sps->i1_vui_parameters_present_flag) in ih264e_populate_sps()
1074 sps_t *ps_sps) in ih264e_populate_slice_header() argument
1106 if (!ps_sps->i1_frame_mbs_only_flag) in ih264e_populate_slice_header()
1127 if (ps_sps->i1_pic_order_cnt_type == 0) in ih264e_populate_slice_header()
1132 i4_poc %= (1 << ps_sps->i1_log2_max_pic_order_cnt_lsb); in ih264e_populate_slice_header()
1136 else if (ps_sps->i1_pic_order_cnt_type == 1) in ih264e_populate_slice_header()