Lines Matching defs:sps

146     uint8_t *sps, *pps, *sps_ext;
176 /* look for sps and pps */
212 sps_size = avio_get_dyn_buf(sps_pb, &sps);
222 avio_w8(pb, sps[3]); /* profile */
223 avio_w8(pb, sps[4]); /* profile compat */
224 avio_w8(pb, sps[5]); /* level */
226 avio_w8(pb, 0xe0 | nb_sps); /* 3 bits reserved (111) + 5 bits number of sps */
228 avio_write(pb, sps, sps_size);
232 if (sps[3] != 66 && sps[3] != 77 && sps[3] != 88) {
234 ret = ff_avc_decode_sps(&seq, sps + 3, sps_size - 3);
241 avio_w8(pb, nb_sps_ext); /* number of sps ext */
368 int ff_avc_decode_sps(H264SPS *sps, const uint8_t *buf, int buf_size)
385 memset(sps, 0, sizeof(*sps));
387 sps->profile_idc = get_bits(&gb, 8);
388 sps->constraint_set_flags |= get_bits1(&gb) << 0; // constraint_set0_flag
389 sps->constraint_set_flags |= get_bits1(&gb) << 1; // constraint_set1_flag
390 sps->constraint_set_flags |= get_bits1(&gb) << 2; // constraint_set2_flag
391 sps->constraint_set_flags |= get_bits1(&gb) << 3; // constraint_set3_flag
392 sps->constraint_set_flags |= get_bits1(&gb) << 4; // constraint_set4_flag
393 sps->constraint_set_flags |= get_bits1(&gb) << 5; // constraint_set5_flag
395 sps->level_idc = get_bits(&gb, 8);
396 sps->id = get_ue_golomb(&gb);
398 if (sps->profile_idc == 100 || sps->profile_idc == 110 ||
399 sps->profile_idc == 122 || sps->profile_idc == 244 || sps->profile_idc == 44 ||
400 sps->profile_idc == 83 || sps->profile_idc == 86 || sps->profile_idc == 118 ||
401 sps->profile_idc == 128 || sps->profile_idc == 138 || sps->profile_idc == 139 ||
402 sps->profile_idc == 134) {
403 sps->chroma_format_idc = get_ue_golomb(&gb); // chroma_format_idc
404 if (sps->chroma_format_idc == 3) {
407 sps->bit_depth_luma = get_ue_golomb(&gb) + 8;
408 sps->bit_depth_chroma = get_ue_golomb(&gb) + 8;
411 for (i = 0; i < ((sps->chroma_format_idc != 3) ? 8 : 12); i++) {
427 sps->chroma_format_idc = 1;
428 sps->bit_depth_luma = 8;
429 sps->bit_depth_chroma = 8;
451 sps->frame_mbs_only_flag = get_bits1(&gb);
452 if (!sps->frame_mbs_only_flag)
468 sps->sar.num = get_bits(&gb, 16);
469 sps->sar.den = get_bits(&gb, 16);
471 sps->sar = avc_sample_aspect_ratio[aspect_ratio_idc];
476 if (!sps->sar.den) {
477 sps->sar.num = 1;
478 sps->sar.den = 1;