Mercurial > libavcodec.hg
comparison h263.c @ 2167:76334bbb5038 libavcodec
user overrideable level & profile
author | michael |
---|---|
date | Fri, 13 Aug 2004 13:59:28 +0000 |
parents | 82816cad0e29 |
children | f140ada1f755 |
comparison
equal
deleted
inserted
replaced
2166:10d28761f78c | 2167:76334bbb5038 |
---|---|
2152 | 2152 |
2153 static void mpeg4_encode_visual_object_header(MpegEncContext * s){ | 2153 static void mpeg4_encode_visual_object_header(MpegEncContext * s){ |
2154 int profile_and_level_indication; | 2154 int profile_and_level_indication; |
2155 int vo_ver_id; | 2155 int vo_ver_id; |
2156 | 2156 |
2157 if(s->max_b_frames || s->quarter_sample){ | 2157 if(s->avctx->profile != FF_PROFILE_UNKNOWN){ |
2158 profile_and_level_indication= 0xF1; // adv simple level 1 | 2158 profile_and_level_indication = s->avctx->profile << 4; |
2159 }else if(s->max_b_frames || s->quarter_sample){ | |
2160 profile_and_level_indication= 0xF0; // adv simple | |
2161 }else{ | |
2162 profile_and_level_indication= 0x00; // simple | |
2163 } | |
2164 | |
2165 if(s->avctx->level != FF_LEVEL_UNKNOWN){ | |
2166 profile_and_level_indication |= s->avctx->level; | |
2167 }else{ | |
2168 profile_and_level_indication |= 1; //level 1 | |
2169 } | |
2170 | |
2171 if(profile_and_level_indication>>4 == 0xF){ | |
2159 vo_ver_id= 5; | 2172 vo_ver_id= 5; |
2160 }else{ | 2173 }else{ |
2161 profile_and_level_indication= 0x01; // simple level 1 | |
2162 vo_ver_id= 1; | 2174 vo_ver_id= 1; |
2163 } | 2175 } |
2176 | |
2164 //FIXME levels | 2177 //FIXME levels |
2165 | 2178 |
2166 put_bits(&s->pb, 16, 0); | 2179 put_bits(&s->pb, 16, 0); |
2167 put_bits(&s->pb, 16, VOS_STARTCODE); | 2180 put_bits(&s->pb, 16, VOS_STARTCODE); |
2168 | 2181 |