Lines Matching full:sps

11  * generator to generate the RBSP for SPS/PPS nal units and add them to the
198 static void nal_h264_rbsp_sps(struct rbsp *rbsp, struct nal_h264_sps *sps) in nal_h264_rbsp_sps() argument
202 if (!sps) { in nal_h264_rbsp_sps()
207 rbsp_bits(rbsp, 8, &sps->profile_idc); in nal_h264_rbsp_sps()
208 rbsp_bit(rbsp, &sps->constraint_set0_flag); in nal_h264_rbsp_sps()
209 rbsp_bit(rbsp, &sps->constraint_set1_flag); in nal_h264_rbsp_sps()
210 rbsp_bit(rbsp, &sps->constraint_set2_flag); in nal_h264_rbsp_sps()
211 rbsp_bit(rbsp, &sps->constraint_set3_flag); in nal_h264_rbsp_sps()
212 rbsp_bit(rbsp, &sps->constraint_set4_flag); in nal_h264_rbsp_sps()
213 rbsp_bit(rbsp, &sps->constraint_set5_flag); in nal_h264_rbsp_sps()
214 rbsp_bits(rbsp, 2, &sps->reserved_zero_2bits); in nal_h264_rbsp_sps()
215 rbsp_bits(rbsp, 8, &sps->level_idc); in nal_h264_rbsp_sps()
217 rbsp_uev(rbsp, &sps->seq_parameter_set_id); in nal_h264_rbsp_sps()
219 if (sps->profile_idc == 100 || sps->profile_idc == 110 || in nal_h264_rbsp_sps()
220 sps->profile_idc == 122 || sps->profile_idc == 244 || in nal_h264_rbsp_sps()
221 sps->profile_idc == 44 || sps->profile_idc == 83 || in nal_h264_rbsp_sps()
222 sps->profile_idc == 86 || sps->profile_idc == 118 || in nal_h264_rbsp_sps()
223 sps->profile_idc == 128 || sps->profile_idc == 138 || in nal_h264_rbsp_sps()
224 sps->profile_idc == 139 || sps->profile_idc == 134 || in nal_h264_rbsp_sps()
225 sps->profile_idc == 135) { in nal_h264_rbsp_sps()
226 rbsp_uev(rbsp, &sps->chroma_format_idc); in nal_h264_rbsp_sps()
228 if (sps->chroma_format_idc == 3) in nal_h264_rbsp_sps()
229 rbsp_bit(rbsp, &sps->separate_colour_plane_flag); in nal_h264_rbsp_sps()
230 rbsp_uev(rbsp, &sps->bit_depth_luma_minus8); in nal_h264_rbsp_sps()
231 rbsp_uev(rbsp, &sps->bit_depth_chroma_minus8); in nal_h264_rbsp_sps()
232 rbsp_bit(rbsp, &sps->qpprime_y_zero_transform_bypass_flag); in nal_h264_rbsp_sps()
233 rbsp_bit(rbsp, &sps->seq_scaling_matrix_present_flag); in nal_h264_rbsp_sps()
234 if (sps->seq_scaling_matrix_present_flag) in nal_h264_rbsp_sps()
238 rbsp_uev(rbsp, &sps->log2_max_frame_num_minus4); in nal_h264_rbsp_sps()
240 rbsp_uev(rbsp, &sps->pic_order_cnt_type); in nal_h264_rbsp_sps()
241 switch (sps->pic_order_cnt_type) { in nal_h264_rbsp_sps()
243 rbsp_uev(rbsp, &sps->log2_max_pic_order_cnt_lsb_minus4); in nal_h264_rbsp_sps()
246 rbsp_bit(rbsp, &sps->delta_pic_order_always_zero_flag); in nal_h264_rbsp_sps()
247 rbsp_sev(rbsp, &sps->offset_for_non_ref_pic); in nal_h264_rbsp_sps()
248 rbsp_sev(rbsp, &sps->offset_for_top_to_bottom_field); in nal_h264_rbsp_sps()
250 rbsp_uev(rbsp, &sps->num_ref_frames_in_pic_order_cnt_cycle); in nal_h264_rbsp_sps()
251 for (i = 0; i < sps->num_ref_frames_in_pic_order_cnt_cycle; i++) in nal_h264_rbsp_sps()
252 rbsp_sev(rbsp, &sps->offset_for_ref_frame[i]); in nal_h264_rbsp_sps()
259 rbsp_uev(rbsp, &sps->max_num_ref_frames); in nal_h264_rbsp_sps()
260 rbsp_bit(rbsp, &sps->gaps_in_frame_num_value_allowed_flag); in nal_h264_rbsp_sps()
261 rbsp_uev(rbsp, &sps->pic_width_in_mbs_minus1); in nal_h264_rbsp_sps()
262 rbsp_uev(rbsp, &sps->pic_height_in_map_units_minus1); in nal_h264_rbsp_sps()
264 rbsp_bit(rbsp, &sps->frame_mbs_only_flag); in nal_h264_rbsp_sps()
265 if (!sps->frame_mbs_only_flag) in nal_h264_rbsp_sps()
266 rbsp_bit(rbsp, &sps->mb_adaptive_frame_field_flag); in nal_h264_rbsp_sps()
268 rbsp_bit(rbsp, &sps->direct_8x8_inference_flag); in nal_h264_rbsp_sps()
270 rbsp_bit(rbsp, &sps->frame_cropping_flag); in nal_h264_rbsp_sps()
271 if (sps->frame_cropping_flag) { in nal_h264_rbsp_sps()
272 rbsp_uev(rbsp, &sps->crop_left); in nal_h264_rbsp_sps()
273 rbsp_uev(rbsp, &sps->crop_right); in nal_h264_rbsp_sps()
274 rbsp_uev(rbsp, &sps->crop_top); in nal_h264_rbsp_sps()
275 rbsp_uev(rbsp, &sps->crop_bottom); in nal_h264_rbsp_sps()
278 rbsp_bit(rbsp, &sps->vui_parameters_present_flag); in nal_h264_rbsp_sps()
279 if (sps->vui_parameters_present_flag) in nal_h264_rbsp_sps()
280 nal_h264_rbsp_vui_parameters(rbsp, &sps->vui); in nal_h264_rbsp_sps()
340 * nal_h264_write_sps() - Write SPS NAL unit into RBSP format
344 * @sps: &struct nal_h264_sps to convert to RBSP
346 * Convert @sps to RBSP data and write it into @dest.
348 * The size of the SPS NAL unit is not known in advance and this function will
349 * fail, if @dest does not hold sufficient space for the SPS NAL unit.
354 void *dest, size_t n, struct nal_h264_sps *sps) in nal_h264_write_sps() argument
372 nal_h264_rbsp_sps(&rbsp, sps); in nal_h264_write_sps()
384 * nal_h264_read_sps() - Read SPS NAL unit from RBSP format
386 * @sps: the &struct nal_h264_sps to fill from the RBSP data
390 * Read RBSP data from @src and use it to fill @sps.
395 struct nal_h264_sps *sps, void *src, size_t n) in nal_h264_read_sps() argument
419 nal_h264_rbsp_sps(&rbsp, sps); in nal_h264_read_sps()