static int decode_seq_header(AVSContext *h) {

    MpegEncContext *s = &h->s;

    int frame_rate_code;

    int width, height;



    h->profile =         get_bits(&s->gb,8);

    h->level =           get_bits(&s->gb,8);

    skip_bits1(&s->gb); //progressive sequence

       width =           get_bits(&s->gb,14);

       height =          get_bits(&s->gb,14);

    if ((s->width || s->height) && (s->width != width || s->height != height)) {

        av_log_missing_feature(s, "Width/height changing in CAVS is", 0);

        return -1;






    s->width  = width;

    s->height = height;

    skip_bits(&s->gb,2); //chroma format

    skip_bits(&s->gb,3); //sample_precision

    h->aspect_ratio =    get_bits(&s->gb,4);

    frame_rate_code =    get_bits(&s->gb,4);

    skip_bits(&s->gb,18);//bit_rate_lower

    skip_bits1(&s->gb);  //marker_bit

    skip_bits(&s->gb,12);//bit_rate_upper

    s->low_delay =       get_bits1(&s->gb);

    h->mb_width  = (s->width  + 15) >> 4;

    h->mb_height = (s->height + 15) >> 4;

    h->s.avctx->time_base.den = avpriv_frame_rate_tab[frame_rate_code].num;

    h->s.avctx->time_base.num = avpriv_frame_rate_tab[frame_rate_code].den;

    h->s.avctx->width  = s->width;

    h->s.avctx->height = s->height;

    if(!h->top_qp)

        ff_cavs_init_top_lines(h);

    return 0;

static int decode_seq_header(AVSContext *h) {

    MpegEncContext *s = &h->s;

    int frame_rate_code;

    int width, height;



    h->profile =         get_bits(&s->gb,8);

    h->level =           get_bits(&s->gb,8);

    skip_bits1(&s->gb); 

       width =           get_bits(&s->gb,14);

       height =          get_bits(&s->gb,14);

    if ((s->width || s->height) && (s->width != width || s->height != height)) {

        av_log_missing_feature(s, "Width/height changing in CAVS is", 0);

        return -1;






    s->width  = width;

    s->height = height;

    skip_bits(&s->gb,2); 

    skip_bits(&s->gb,3); 

    h->aspect_ratio =    get_bits(&s->gb,4);

    frame_rate_code =    get_bits(&s->gb,4);

    skip_bits(&s->gb,18);

    skip_bits1(&s->gb);  

    skip_bits(&s->gb,12);

    s->low_delay =       get_bits1(&s->gb);

    h->mb_width  = (s->width  + 15) >> 4;

    h->mb_height = (s->height + 15) >> 4;

    h->s.avctx->time_base.den = avpriv_frame_rate_tab[frame_rate_code].num;

    h->s.avctx->time_base.num = avpriv_frame_rate_tab[frame_rate_code].den;

    h->s.avctx->width  = s->width;

    h->s.avctx->height = s->height;

    if(!h->top_qp)

        ff_cavs_init_top_lines(h);

    return 0;

static int FUNC_0(AVSContext *VAR_0) {

    MpegEncContext *s = &VAR_0->s;

    int VAR_1;

    int VAR_2, VAR_3;



    VAR_0->profile =         get_bits(&s->gb,8);

    VAR_0->level =           get_bits(&s->gb,8);

    skip_bits1(&s->gb); 

       VAR_2 =           get_bits(&s->gb,14);

       VAR_3 =          get_bits(&s->gb,14);

    if ((s->VAR_2 || s->VAR_3) && (s->VAR_2 != VAR_2 || s->VAR_3 != VAR_3)) {

        av_log_missing_feature(s, "Width/VAR_3 changing in CAVS is", 0);

        return -1;






    s->VAR_2  = VAR_2;

    s->VAR_3 = VAR_3;

    skip_bits(&s->gb,2); 

    skip_bits(&s->gb,3); 

    VAR_0->aspect_ratio =    get_bits(&s->gb,4);

    VAR_1 =    get_bits(&s->gb,4);

    skip_bits(&s->gb,18);

    skip_bits1(&s->gb);  

    skip_bits(&s->gb,12);

    s->low_delay =       get_bits1(&s->gb);

    VAR_0->mb_width  = (s->VAR_2  + 15) >> 4;

    VAR_0->mb_height = (s->VAR_3 + 15) >> 4;

    VAR_0->s.avctx->time_base.den = avpriv_frame_rate_tab[VAR_1].num;

    VAR_0->s.avctx->time_base.num = avpriv_frame_rate_tab[VAR_1].den;

    VAR_0->s.avctx->VAR_2  = s->VAR_2;

    VAR_0->s.avctx->VAR_3 = s->VAR_3;

    if(!VAR_0->top_qp)

        ff_cavs_init_top_lines(VAR_0);

    return 0;

static int FUNC_0(AVSContext *VAR_0) { MpegEncContext *s = &VAR_0->s; int VAR_1; int VAR_2, VAR_3; VAR_0->profile =         get_bits(&s->gb,8); VAR_0->level =           get_bits(&s->gb,8); skip_bits1(&s->gb); VAR_2 =           get_bits(&s->gb,14); VAR_3 =          get_bits(&s->gb,14); if ((s->VAR_2 || s->VAR_3) && (s->VAR_2 != VAR_2 || s->VAR_3 != VAR_3)) { av_log_missing_feature(s, "Width/VAR_3 changing in CAVS is", 0); return -1; s->VAR_2  = VAR_2; s->VAR_3 = VAR_3; skip_bits(&s->gb,2); skip_bits(&s->gb,3); VAR_0->aspect_ratio =    get_bits(&s->gb,4); VAR_1 =    get_bits(&s->gb,4); skip_bits(&s->gb,18); skip_bits1(&s->gb); skip_bits(&s->gb,12); s->low_delay =       get_bits1(&s->gb); VAR_0->mb_width  = (s->VAR_2  + 15) >> 4; VAR_0->mb_height = (s->VAR_3 + 15) >> 4; VAR_0->s.avctx->time_base.den = avpriv_frame_rate_tab[VAR_1].num; VAR_0->s.avctx->time_base.num = avpriv_frame_rate_tab[VAR_1].den; VAR_0->s.avctx->VAR_2  = s->VAR_2; VAR_0->s.avctx->VAR_3 = s->VAR_3; if(!VAR_0->top_qp)
ff_cavs_init_top_lines(VAR_0); return 0;