h264: Add Intra and Constrained Baseline profiles to avctx.profile
This commit is contained in:
parent
e86e858111
commit
fe9a3fbe42
5 changed files with 56 additions and 15 deletions
|
|
@ -267,16 +267,16 @@ static void decode_scaling_matrices(H264Context *h, SPS *sps, PPS *pps, int is_s
|
|||
|
||||
int ff_h264_decode_seq_parameter_set(H264Context *h){
|
||||
MpegEncContext * const s = &h->s;
|
||||
int profile_idc, level_idc;
|
||||
int profile_idc, level_idc, constraint_set_flags = 0;
|
||||
unsigned int sps_id;
|
||||
int i;
|
||||
SPS *sps;
|
||||
|
||||
profile_idc= get_bits(&s->gb, 8);
|
||||
get_bits1(&s->gb); //constraint_set0_flag
|
||||
get_bits1(&s->gb); //constraint_set1_flag
|
||||
get_bits1(&s->gb); //constraint_set2_flag
|
||||
get_bits1(&s->gb); //constraint_set3_flag
|
||||
constraint_set_flags |= get_bits1(&s->gb) << 0; //constraint_set0_flag
|
||||
constraint_set_flags |= get_bits1(&s->gb) << 1; //constraint_set1_flag
|
||||
constraint_set_flags |= get_bits1(&s->gb) << 2; //constraint_set2_flag
|
||||
constraint_set_flags |= get_bits1(&s->gb) << 3; //constraint_set3_flag
|
||||
get_bits(&s->gb, 4); // reserved
|
||||
level_idc= get_bits(&s->gb, 8);
|
||||
sps_id= get_ue_golomb_31(&s->gb);
|
||||
|
|
@ -291,6 +291,7 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
|
|||
|
||||
sps->time_offset_length = 24;
|
||||
sps->profile_idc= profile_idc;
|
||||
sps->constraint_set_flags = constraint_set_flags;
|
||||
sps->level_idc= level_idc;
|
||||
|
||||
memset(sps->scaling_matrix4, 16, sizeof(sps->scaling_matrix4));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue