s->vo_type= s->has_b_frames ? CORE_VO_TYPE : SIMPLE_VO_TYPE;
static void mpeg4_encode_vol_header(MpegEncContext * s){    int vo_ver_id=1; //must be 2 if we want GMC or q-pel    char buf[255];        if(get_bit_count(&s->pb)!=0) mpeg4_stuffing(&s->pb);    put_bits(&s->pb, 16, 0);    put_bits(&s->pb, 16, 0x100);        /* video obj */    put_bits(&s->pb, 16, 0);    put_bits(&s->pb, 16, 0x120);        /* video obj layer */    put_bits(&s->pb, 1, 0);		/* random access vol */    put_bits(&s->pb, 8, 1);		/* video obj type indication= simple obj */    put_bits(&s->pb, 1, 1);		/* is obj layer id= yes */      put_bits(&s->pb, 4, vo_ver_id);	/* is obj layer ver id */      put_bits(&s->pb, 3, 1);		/* is obj layer priority */    if(s->aspect_ratio_info)         put_bits(&s->pb, 4, s->aspect_ratio_info);/* aspect ratio info */    else        put_bits(&s->pb, 4, 1);		/* aspect ratio info= sqare pixel */    put_bits(&s->pb, 1, 0);		/* vol control parameters= no */    put_bits(&s->pb, 2, RECT_SHAPE);	/* vol shape= rectangle */    put_bits(&s->pb, 1, 1);		/* marker bit */        put_bits(&s->pb, 16, s->time_increment_resolution);    if (s->time_increment_bits < 1)        s->time_increment_bits = 1;    put_bits(&s->pb, 1, 1);		/* marker bit */    put_bits(&s->pb, 1, 0);		/* fixed vop rate=no */    put_bits(&s->pb, 1, 1);		/* marker bit */    put_bits(&s->pb, 13, s->width);	/* vol width */    put_bits(&s->pb, 1, 1);		/* marker bit */    put_bits(&s->pb, 13, s->height);	/* vol height */    put_bits(&s->pb, 1, 1);		/* marker bit */    put_bits(&s->pb, 1, 0);		/* interlace */    put_bits(&s->pb, 1, 1);		/* obmc disable */    if (vo_ver_id == 1) {        put_bits(&s->pb, 1, s->vol_sprite_usage=0);		/* sprite enable */    }else{ /* vo_ver_id == 2 */        put_bits(&s->pb, 2, s->vol_sprite_usage=0);		/* sprite enable */    }    put_bits(&s->pb, 1, 0);		/* not 8 bit */    put_bits(&s->pb, 1, 0);		/* quant type= h263 style*/    if (vo_ver_id != 1)        put_bits(&s->pb, 1, s->quarter_sample=0);    put_bits(&s->pb, 1, 1);		/* complexity estimation disable */    put_bits(&s->pb, 1, 1);		/* resync marker disable */    put_bits(&s->pb, 1, 0);		/* data partitioned */    if (vo_ver_id != 1){        put_bits(&s->pb, 1, 0);		/* newpred */        put_bits(&s->pb, 1, 0);		/* reduced res vop */    }    put_bits(&s->pb, 1, 0);		/* scalability */    mpeg4_stuffing(&s->pb);    put_bits(&s->pb, 16, 0);    put_bits(&s->pb, 16, 0x1B2);	/* user_data */    sprintf(buf, "FFmpeg v%s / libavcodec build: %s", FFMPEG_VERSION, LIBAVCODEC_BUILD_STR);    put_string(&s->pb, buf);    s->no_rounding = 0;}