s->umvplus_dec = get_bits(&s->gb, 1);
s->umvplus = get_bits(&s->gb, 1);
int h263_decode_picture_header(MpegEncContext *s){    int format, width, height;    /* picture start code */    if (get_bits(&s->gb, 22) != 0x20) {        fprintf(stderr, "Bad picture start code\n");        return -1;    }    /* temporal reference */    s->picture_number = get_bits(&s->gb, 8); /* picture timestamp */    /* PTYPE starts here */        if (get_bits1(&s->gb) != 1) {        /* marker */        fprintf(stderr, "Bad marker\n");        return -1;    }    if (get_bits1(&s->gb) != 0) {        fprintf(stderr, "Bad H263 id\n");        return -1;	/* h263 id */    }    skip_bits1(&s->gb);	/* split screen off */    skip_bits1(&s->gb);	/* camera  off */    skip_bits1(&s->gb);	/* freeze picture release off */    /* Reset GOB number */    s->gob_number = 0;            format = get_bits(&s->gb, 3);    /*        0    forbidden        1    sub-QCIF        10   QCIF        7	extended PTYPE (PLUSPTYPE)    */    if (format != 7 && format != 6) {        s->h263_plus = 0;        /* H.263v1 */        width = h263_format[format][0];        height = h263_format[format][1];        if (!width)            return -1;                s->width = width;        s->height = height;        s->pict_type = I_TYPE + get_bits1(&s->gb);        s->unrestricted_mv = get_bits1(&s->gb);         s->h263_long_vectors = s->unrestricted_mv;        if (get_bits1(&s->gb) != 0) {            fprintf(stderr, "H263 SAC not supported\n");            return -1;	/* SAC: off */        }        if (get_bits1(&s->gb) != 0) {            s->mv_type = MV_TYPE_8X8; /* Advanced prediction mode */        }                   if (get_bits1(&s->gb) != 0) {            fprintf(stderr, "H263 PB frame not supported\n");            return -1;	/* not PB frame */        }        s->qscale = get_bits(&s->gb, 5);        skip_bits1(&s->gb);	/* Continuous Presence Multipoint mode: off */    } else {        int ufep;                /* H.263v2 */        s->h263_plus = 1;        ufep = get_bits(&s->gb, 3); /* Update Full Extended PTYPE */        /* ufep other than 0 and 1 are reserved */                if (ufep == 1) {            /* OPPTYPE */                   format = get_bits(&s->gb, 3);            dprintf("ufep=1, format: %d\n", format);            skip_bits(&s->gb,1); /* Custom PCF */            s->umvplus_dec = get_bits(&s->gb, 1); /* Unrestricted Motion Vector */            skip_bits1(&s->gb); /* Syntax-based Arithmetic Coding (SAC) */            if (get_bits1(&s->gb) != 0) {                s->mv_type = MV_TYPE_8X8; /* Advanced prediction mode */            }            if (get_bits1(&s->gb) != 0) { /* Advanced Intra Coding (AIC) */                s->h263_aic = 1;            }	                skip_bits(&s->gb, 7);            /* these are the 7 bits: (in order of appearence  */            /* Deblocking Filter */            /* Slice Structured */            /* Reference Picture Selection */            /* Independent Segment Decoding */            /* Alternative Inter VLC */            /* Modified Quantization */            /* Prevent start code emulation */            skip_bits(&s->gb, 3); /* Reserved */        } else if (ufep != 0) {            fprintf(stderr, "Bad UFEP type (%d)\n", ufep);            return -1;        }                    /* MPPTYPE */        s->pict_type = get_bits(&s->gb, 3) + I_TYPE;        dprintf("pict_type: %d\n", s->pict_type);        if (s->pict_type != I_TYPE &&            s->pict_type != P_TYPE)            return -1;        skip_bits(&s->gb, 2);        s->no_rounding = get_bits1(&s->gb);        dprintf("RTYPE: %d\n", s->no_rounding);        skip_bits(&s->gb, 4);                /* Get the picture dimensions */        if (ufep) {            if (format == 6) {                /* Custom Picture Format (CPFMT) */                s->aspect_ratio_info = get_bits(&s->gb, 4);                dprintf("aspect: %d\n", s->aspect_ratio_info);                /* aspect ratios:                0 - forbidden                1 - 1:1                2 - 12:11 (CIF 4:3)                3 - 10:11 (525-type 4:3)                4 - 16:11 (CIF 16:9)                5 - 40:33 (525-type 16:9)                6-14 - reserved                */                width = (get_bits(&s->gb, 9) + 1) * 4;                skip_bits1(&s->gb);                height = get_bits(&s->gb, 9) * 4;                dprintf("\nH.263+ Custom picture: %dx%d\n",width,height);                if (s->aspect_ratio_info == FF_ASPECT_EXTENDED) {                    /* aspected dimensions */		    s->aspected_width = get_bits(&s->gb, 8);		    s->aspected_height = get_bits(&s->gb, 8);                }else{                    s->aspected_width = pixel_aspect[s->aspect_ratio_info][0];                    s->aspected_height= pixel_aspect[s->aspect_ratio_info][1];                }            } else {                width = h263_format[format][0];                height = h263_format[format][1];            }            if ((width == 0) || (height == 0))                return -1;            s->width = width;            s->height = height;            if (s->umvplus_dec) {                skip_bits1(&s->gb); /* Unlimited Unrestricted Motion Vectors Indicator (UUI) */            }        }                    s->qscale = get_bits(&s->gb, 5);    }    /* PEI */    while (get_bits1(&s->gb) != 0) {        skip_bits(&s->gb, 8);    }    s->f_code = 1;        if(s->h263_aic){         s->y_dc_scale_table=          s->c_dc_scale_table= h263_aic_dc_scale_table;    }else{        s->y_dc_scale_table=        s->c_dc_scale_table= ff_mpeg1_dc_scale_table;    }    return 0;}