if ( get_bits(gb, 1) )
if ( !get_bits(gb, 1) )
static int decode_advanced_sequence_header(AVCodecContext *avctx, GetBitContext *gb){    VC9Context *v = avctx->priv_data;    int nr, dr, aspect_ratio;    v->postprocflag = get_bits(gb, 1);    v->broadcast = get_bits(gb, 1);    v->interlace = get_bits(gb, 1);    v->tfcntrflag = get_bits(gb, 1);    v->finterpflag = get_bits(gb, 1); //common    v->panscanflag = get_bits(gb, 1);    v->reserved = get_bits(gb, 1);    if (v->reserved)    {        av_log(avctx, AV_LOG_ERROR, "RESERVED should be 0 (is %i)\n",               v->reserved);        return -1;    }    if (v->extended_mv)        v->extended_dmv = get_bits(gb, 1);    /* 6.1.7, p21 */    if (get_bits(gb, 1) /* pic_size_flag */)    {        avctx->coded_width = get_bits(gb, 12);        avctx->coded_height = get_bits(gb, 12);        if ( get_bits(gb, 1) /* disp_size_flag */)        {            avctx->width = get_bits(gb, 14);            avctx->height = get_bits(gb, 14);        }        /* 6.1.7.4, p22 */        if ( get_bits(gb, 1) /* aspect_ratio_flag */)        {            aspect_ratio = get_bits(gb, 4); //SAR            if (aspect_ratio == 0x0F) //FF_ASPECT_EXTENDED            {                avctx->sample_aspect_ratio.num = get_bits(gb, 8);                avctx->sample_aspect_ratio.den = get_bits(gb, 8);            }            else if (aspect_ratio == 0x0E)            {                av_log(avctx, AV_LOG_DEBUG, "Reserved AR found\n");            }            else            {              avctx->sample_aspect_ratio = vc9_pixel_aspect[aspect_ratio];            }        }    }    else    {        avctx->coded_width = avctx->width;        avctx->coded_height = avctx->height;    }    /* 6.1.8, p23 */    if ( get_bits(gb, 1) /* framerateflag */)    {        if ( get_bits(gb, 1) /* framerateind */)        {            nr = get_bits(gb, 8);            dr = get_bits(gb, 4);            if (nr<1)            {                av_log(avctx, AV_LOG_ERROR, "0 is forbidden for FRAMERATENR\n");                return -1;            }            if (nr>5)            {                av_log(avctx, AV_LOG_ERROR,                       "Reserved FRAMERATENR %i not handled\n", nr);           }            if (dr<1)            {                av_log(avctx, AV_LOG_ERROR, "0 is forbidden for FRAMERATEDR\n");           }            if (dr>2)            {                av_log(avctx, AV_LOG_ERROR,                       "Reserved FRAMERATEDR %i not handled\n", dr);            }            avctx->frame_rate_base = fps_nr[dr];            avctx->frame_rate = fps_nr[nr];        }        else        {            nr = get_bits(gb, 16);            // 0.03125->2048Hz / 0.03125Hz            avctx->frame_rate = 1000000;            avctx->frame_rate_base = 31250*(1+nr);        }    }    /* 6.1.9, p25 */    if ( get_bits(gb, 1) /* color_format_flag */)    {        //Chromacity coordinates of color primaries        //like ITU-R BT.709-2, BT.470-2, ...        v->color_prim = get_bits(gb, 8);        if (v->color_prim<1)        {            av_log(avctx, AV_LOG_ERROR, "0 for COLOR_PRIM is reserved\n");            return -1;        }        if (v->color_prim == 3 || v->color_prim>6)        {            av_log(avctx, AV_LOG_DEBUG, "Reserved COLOR_PRIM %i found\n",                   v->color_prim);            return -1;        }        //Opto-electronic transfer characteristics        v->transfer_char = get_bits(gb, 8);        if (v->transfer_char == 3 || v->transfer_char>8)        {            av_log(avctx, AV_LOG_DEBUG, "Reserved TRANSFERT_CHAR %i found\n",                   v->color_prim);            return -1;        }        //Matrix coefficient for primariev->YCbCr        v->matrix_coef = get_bits(gb, 8);        if (v->matrix_coef < 1) return -1; //forbidden        if ((v->matrix_coef>3 && v->matrix_coef<6) || v->matrix_coef>7)        {            av_log(avctx, AV_LOG_DEBUG, "Reserved MATRIX_COEF %i found\n",                   v->color_prim);            return -1;        }    }    //Hypothetical reference decoder indicator flag    v->hrd_param_flag = get_bits(gb, 1);    if (v->hrd_param_flag)    {      if (decode_hrd(v, gb) < 0) return -1;    }    av_log(avctx, AV_LOG_DEBUG, "Advanced profile not supported yet\n");    return -1;}