summaryrefslogtreecommitdiff
path: root/libavcodec/h263.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-08-13 13:59:28 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-08-13 13:59:28 +0000
commitbaced9f5986a466c957456f5cf32a722d8b35512 (patch)
tree48f9ff3b97449b4b4f93e69eacf759cb575b488c /libavcodec/h263.c
parentc2b9685ecadbf07e8b351070eb50febb111ab1e3 (diff)
user overrideable level & profile
Originally committed as revision 3385 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h263.c')
-rw-r--r--libavcodec/h263.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/libavcodec/h263.c b/libavcodec/h263.c
index 8c26634de4..3cc1171855 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);