static void encode_signal_range(VC2EncContext *s)

{

    int idx;

    AVCodecContext *avctx = s->avctx;

    const AVPixFmtDescriptor *fmt = av_pix_fmt_desc_get(avctx->pix_fmt);

    const int depth = fmt->comp[0].depth;

    if (depth == 8 && avctx->color_range == AVCOL_RANGE_JPEG) {

        idx = 1;

        s->bpp = 1;

        s->diff_offset = 128;

    } else if (depth == 8 && (avctx->color_range == AVCOL_RANGE_MPEG ||

               avctx->color_range == AVCOL_RANGE_UNSPECIFIED)) {

        idx = 2;

        s->bpp = 1;

        s->diff_offset = 128;

    } else if (depth == 10) {

        idx = 3;

        s->bpp = 2;

        s->diff_offset = 512;

    } else {

        idx = 4;

        s->bpp = 2;

        s->diff_offset = 2048;

    }

    put_bits(&s->pb, 1, !s->strict_compliance);

    if (!s->strict_compliance)

        put_vc2_ue_uint(&s->pb, idx);

}

static void encode_signal_range(VC2EncContext *s)

{

    int idx;

    AVCodecContext *avctx = s->avctx;

    const AVPixFmtDescriptor *fmt = av_pix_fmt_desc_get(avctx->pix_fmt);

    const int depth = fmt->comp[0].depth;

    if (depth == 8 && avctx->color_range == AVCOL_RANGE_JPEG) {

        idx = 1;

        s->bpp = 1;

        s->diff_offset = 128;

    } else if (depth == 8 && (avctx->color_range == AVCOL_RANGE_MPEG ||

               avctx->color_range == AVCOL_RANGE_UNSPECIFIED)) {

        idx = 2;

        s->bpp = 1;

        s->diff_offset = 128;

    } else if (depth == 10) {

        idx = 3;

        s->bpp = 2;

        s->diff_offset = 512;

    } else {

        idx = 4;

        s->bpp = 2;

        s->diff_offset = 2048;

    }

    put_bits(&s->pb, 1, !s->strict_compliance);

    if (!s->strict_compliance)

        put_vc2_ue_uint(&s->pb, idx);

}

    int idx;     AVCodecContext *avctx = s->avctx;     const AVPixFmtDescriptor *fmt = av_pix_fmt_desc_get(avctx->pix_fmt);     const int depth = fmt->comp[0].depth;     if (depth == 8 && avctx->color_range == AVCOL_RANGE_JPEG) {         idx = 1;         s->bpp = 1;         s->diff_offset = 128;     } else if (depth == 8 && (avctx->color_range == AVCOL_RANGE_MPEG ||                avctx->color_range == AVCOL_RANGE_UNSPECIFIED)) {         idx = 2;         s->bpp = 1;         s->diff_offset = 128;     } else if (depth == 10) {         idx = 3;         s->bpp = 2;         s->diff_offset = 512;     } else {         idx = 4;         s->bpp = 2;         s->diff_offset = 2048;         put_vc2_ue_uint(&s->pb, idx);     } else {     } else {
static void FUNC_0(VC2EncContext *VAR_0)

{

    int VAR_1;

    AVCodecContext *avctx = VAR_0->avctx;

    const AVPixFmtDescriptor *VAR_2 = av_pix_fmt_desc_get(avctx->pix_fmt);

    const int VAR_3 = VAR_2->comp[0].VAR_3;

    if (VAR_3 == 8 && avctx->color_range == AVCOL_RANGE_JPEG) {

        VAR_1 = 1;

        VAR_0->bpp = 1;

        VAR_0->diff_offset = 128;

    } else if (VAR_3 == 8 && (avctx->color_range == AVCOL_RANGE_MPEG ||

               avctx->color_range == AVCOL_RANGE_UNSPECIFIED)) {

        VAR_1 = 2;

        VAR_0->bpp = 1;

        VAR_0->diff_offset = 128;

    } else if (VAR_3 == 10) {

        VAR_1 = 3;

        VAR_0->bpp = 2;

        VAR_0->diff_offset = 512;

    } else {

        VAR_1 = 4;

        VAR_0->bpp = 2;

        VAR_0->diff_offset = 2048;

    }

    put_bits(&VAR_0->pb, 1, !VAR_0->strict_compliance);

    if (!VAR_0->strict_compliance)

        put_vc2_ue_uint(&VAR_0->pb, VAR_1);

}

static void FUNC_0(VC2EncContext *VAR_0)
{ int VAR_1; AVCodecContext *avctx = VAR_0->avctx; const AVPixFmtDescriptor *VAR_2 = av_pix_fmt_desc_get(avctx->pix_fmt); const int VAR_3 = VAR_2->comp[0].VAR_3; if (VAR_3 == 8 && avctx->color_range == AVCOL_RANGE_JPEG) { VAR_1 = 1; VAR_0->bpp = 1; VAR_0->diff_offset = 128; } else if (VAR_3 == 8 && (avctx->color_range == AVCOL_RANGE_MPEG || avctx->color_range == AVCOL_RANGE_UNSPECIFIED)) { VAR_1 = 2; VAR_0->bpp = 1; VAR_0->diff_offset = 128; } else if (VAR_3 == 10) { VAR_1 = 3; VAR_0->bpp = 2; VAR_0->diff_offset = 512; } else { VAR_1 = 4; VAR_0->bpp = 2; VAR_0->diff_offset = 2048; } put_bits(&VAR_0->pb, 1, !VAR_0->strict_compliance); if (!VAR_0->strict_compliance)
put_vc2_ue_uint(&VAR_0->pb, VAR_1); }