diff options
Diffstat (limited to 'libavcodec/h263.c')
-rw-r--r-- | libavcodec/h263.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/libavcodec/h263.c b/libavcodec/h263.c index 8c26634..3cc1171 100644 --- a/libavcodec/h263.c +++ b/libavcodec/h263.c @@ -2154,13 +2154,26 @@ static void mpeg4_encode_visual_object_header(MpegEncContext * s){ int profile_and_level_indication; int vo_ver_id; - if(s->max_b_frames || s->quarter_sample){ - profile_and_level_indication= 0xF1; // adv simple level 1 + if(s->avctx->profile != FF_PROFILE_UNKNOWN){ + profile_and_level_indication = s->avctx->profile << 4; + }else if(s->max_b_frames || s->quarter_sample){ + profile_and_level_indication= 0xF0; // adv simple + }else{ + profile_and_level_indication= 0x00; // simple + } + + if(s->avctx->level != FF_LEVEL_UNKNOWN){ + profile_and_level_indication |= s->avctx->level; + }else{ + profile_and_level_indication |= 1; //level 1 + } + + if(profile_and_level_indication>>4 == 0xF){ vo_ver_id= 5; }else{ - profile_and_level_indication= 0x01; // simple level 1 vo_ver_id= 1; } + //FIXME levels put_bits(&s->pb, 16, 0); |