Lines Matching refs:sps

61 MPP_RET h264e_sps_update(H264eSps *sps, MppEncCfgSet *cfg)  in h264e_sps_update()  argument
63 H264eVui *vui = &sps->vui; in h264e_sps_update()
82 sps->profile_idc = h264->profile; in h264e_sps_update()
83 switch (sps->profile_idc) { in h264e_sps_update()
85 sps->constraint_set0 = 1; in h264e_sps_update()
86 sps->constraint_set1 = 1; in h264e_sps_update()
87 sps->constraint_set2 = 0; in h264e_sps_update()
88 sps->constraint_set3 = 0; in h264e_sps_update()
89 sps->constraint_set4 = 0; in h264e_sps_update()
90 sps->constraint_set5 = 0; in h264e_sps_update()
93 sps->constraint_set0 = 0; in h264e_sps_update()
94 sps->constraint_set1 = 1; in h264e_sps_update()
95 sps->constraint_set2 = 0; in h264e_sps_update()
96 sps->constraint_set3 = 0; in h264e_sps_update()
97 sps->constraint_set4 = 0; in h264e_sps_update()
98 sps->constraint_set5 = 0; in h264e_sps_update()
104 sps->constraint_set0 = 0; in h264e_sps_update()
105 sps->constraint_set1 = 0; in h264e_sps_update()
106 sps->constraint_set2 = 0; in h264e_sps_update()
107 sps->constraint_set3 = 0; in h264e_sps_update()
108 sps->constraint_set4 = 0; in h264e_sps_update()
109 sps->constraint_set5 = 0; in h264e_sps_update()
112 sps->constraint_set0 = 0; in h264e_sps_update()
113 sps->constraint_set1 = 0; in h264e_sps_update()
114 sps->constraint_set2 = 0; in h264e_sps_update()
115 sps->constraint_set3 = 0; in h264e_sps_update()
116 sps->constraint_set4 = 0; in h264e_sps_update()
117 sps->constraint_set5 = 0; in h264e_sps_update()
127 sps->constraint_set0 = (constraint_force & 1) ? 1 : 0; in h264e_sps_update()
129 sps->constraint_set1 = (constraint_force & 2) ? 1 : 0; in h264e_sps_update()
131 sps->constraint_set2 = (constraint_force & 4) ? 1 : 0; in h264e_sps_update()
133 sps->constraint_set3 = (constraint_force & 8) ? 1 : 0; in h264e_sps_update()
135 sps->constraint_set4 = (constraint_force & 16) ? 1 : 0; in h264e_sps_update()
137 sps->constraint_set5 = (constraint_force & 32) ? 1 : 0; in h264e_sps_update()
159 sps->level_idc = level_idc; in h264e_sps_update()
161 sps->sps_id = 0; in h264e_sps_update()
162 sps->chroma_format_idc = (fmt == MPP_FMT_YUV400) ? H264_CHROMA_400 : H264_CHROMA_420; in h264e_sps_update()
165 sps->pic_order_cnt_type = h264->hw_cfg.hw_poc_type; in h264e_sps_update()
166 sps->log2_max_poc_lsb_minus4 = h264->log2_max_poc_lsb; in h264e_sps_update()
167 sps->log2_max_frame_num_minus4 = h264->log2_max_frame_num; in h264e_sps_update()
172 sps->log2_max_frame_num_minus4 = 12; in h264e_sps_update()
173 sps->log2_max_poc_lsb_minus4 = 12; in h264e_sps_update()
176 sps->log2_max_frame_num_minus4 = 12; in h264e_sps_update()
177 sps->log2_max_poc_lsb_minus4 = 12; in h264e_sps_update()
184 if (sps->log2_max_frame_num_minus4 < log2_frm_num) in h264e_sps_update()
185 sps->log2_max_frame_num_minus4 = log2_frm_num; in h264e_sps_update()
190 if (sps->log2_max_poc_lsb_minus4 < log2_poc_lsb) in h264e_sps_update()
191 sps->log2_max_poc_lsb_minus4 = log2_poc_lsb; in h264e_sps_update()
195 sps->num_ref_frames = info->dpb_size; in h264e_sps_update()
197 sps->gaps_in_frame_num_value_allowed = !h264->gaps_not_allowed; in h264e_sps_update()
200 sps->pic_width_in_mbs = aligned_w >> 4; in h264e_sps_update()
201 sps->pic_height_in_mbs = aligned_h >> 4; in h264e_sps_update()
202 sps->frame_mbs_only = 1; in h264e_sps_update()
205 sps->direct8x8_inference = h264->transform8x8_mode; in h264e_sps_update()
207 sps->cropping = 1; in h264e_sps_update()
208 sps->crop.left = 0; in h264e_sps_update()
209 sps->crop.right = crop_right; in h264e_sps_update()
210 sps->crop.top = 0; in h264e_sps_update()
211 sps->crop.bottom = crop_bottom; in h264e_sps_update()
213 sps->cropping = 0; in h264e_sps_update()
214 memset(&sps->crop, 0, sizeof(sps->crop)); in h264e_sps_update()
253 MPP_RET h264e_sps_to_packet(H264eSps *sps, MppPacket packet, RK_S32 *offset, in h264e_sps_to_packet() argument
281 mpp_writer_put_bits(bit, sps->profile_idc, 8); in h264e_sps_to_packet()
283 mpp_writer_put_bits(bit, sps->constraint_set0, 1); in h264e_sps_to_packet()
285 mpp_writer_put_bits(bit, sps->constraint_set1, 1); in h264e_sps_to_packet()
287 mpp_writer_put_bits(bit, sps->constraint_set2, 1); in h264e_sps_to_packet()
289 mpp_writer_put_bits(bit, sps->constraint_set3, 1); in h264e_sps_to_packet()
291 mpp_writer_put_bits(bit, sps->constraint_set4, 1); in h264e_sps_to_packet()
293 mpp_writer_put_bits(bit, sps->constraint_set5, 1); in h264e_sps_to_packet()
298 mpp_writer_put_bits(bit, sps->level_idc, 8); in h264e_sps_to_packet()
300 mpp_writer_put_ue(bit, sps->sps_id); in h264e_sps_to_packet()
302 if (sps->profile_idc >= H264_PROFILE_HIGH) { in h264e_sps_to_packet()
304 mpp_writer_put_ue(bit, sps->chroma_format_idc); in h264e_sps_to_packet()
316 mpp_writer_put_ue(bit, sps->log2_max_frame_num_minus4); in h264e_sps_to_packet()
324 mpp_writer_put_ue(bit, sps->log2_max_poc_lsb_minus4); in h264e_sps_to_packet()
328 mpp_writer_put_ue(bit, sps->num_ref_frames); in h264e_sps_to_packet()
330 mpp_writer_put_bits(bit, sps->gaps_in_frame_num_value_allowed, 1); in h264e_sps_to_packet()
333 mpp_writer_put_ue(bit, sps->pic_width_in_mbs - 1); in h264e_sps_to_packet()
335 mpp_writer_put_ue(bit, sps->pic_height_in_mbs - 1); in h264e_sps_to_packet()
338 mpp_writer_put_bits(bit, sps->frame_mbs_only, 1); in h264e_sps_to_packet()
340 mpp_writer_put_bits(bit, sps->direct8x8_inference, 1); in h264e_sps_to_packet()
342 mpp_writer_put_bits(bit, sps->cropping, 1); in h264e_sps_to_packet()
343 if (sps->cropping) { in h264e_sps_to_packet()
345 mpp_writer_put_ue(bit, sps->crop.left / SubWidthC[sps->chroma_format_idc]); in h264e_sps_to_packet()
347 mpp_writer_put_ue(bit, sps->crop.right / SubWidthC[sps->chroma_format_idc]); in h264e_sps_to_packet()
349 mpp_writer_put_ue(bit, sps->crop.top / SubHeightC[sps->chroma_format_idc]); in h264e_sps_to_packet()
351 mpp_writer_put_ue(bit, sps->crop.bottom / SubHeightC[sps->chroma_format_idc]); in h264e_sps_to_packet()
355 mpp_writer_put_bits(bit, sps->vui.vui_en, 1); in h264e_sps_to_packet()
356 if (sps->vui.vui_en) { in h264e_sps_to_packet()
357 H264eVui *vui = &sps->vui; in h264e_sps_to_packet()
462 MPP_RET h264e_sps_dump(H264eSps *sps) in h264e_sps_dump() argument
464 (void) sps; in h264e_sps_dump()