static int decode_header(SnowContext *s){

    int plane_index, tmp;

    uint8_t kstate[32];



    memset(kstate, MID_STATE, sizeof(kstate));



    s->keyframe= get_rac(&s->c, kstate);

    if(s->keyframe || s->always_reset){

        ff_snow_reset_contexts(s);

        s->spatial_decomposition_type=

        s->qlog=

        s->qbias=

        s->mv_scale=

        s->block_max_depth= 0;

    }

    if(s->keyframe){

        GET_S(s->version, tmp <= 0U)

        s->always_reset= get_rac(&s->c, s->header_state);

        s->temporal_decomposition_type= get_symbol(&s->c, s->header_state, 0);

        s->temporal_decomposition_count= get_symbol(&s->c, s->header_state, 0);

        GET_S(s->spatial_decomposition_count, 0 < tmp && tmp <= MAX_DECOMPOSITIONS)

        s->colorspace_type= get_symbol(&s->c, s->header_state, 0);

        if (s->colorspace_type == 1) {

            s->avctx->pix_fmt= AV_PIX_FMT_GRAY8;

            s->nb_planes = 1;

        } else if(s->colorspace_type == 0) {

            s->chroma_h_shift= get_symbol(&s->c, s->header_state, 0);

            s->chroma_v_shift= get_symbol(&s->c, s->header_state, 0);



            if(s->chroma_h_shift == 1 && s->chroma_v_shift==1){

                s->avctx->pix_fmt= AV_PIX_FMT_YUV420P;

            }else if(s->chroma_h_shift == 0 && s->chroma_v_shift==0){

                s->avctx->pix_fmt= AV_PIX_FMT_YUV444P;

            }else if(s->chroma_h_shift == 2 && s->chroma_v_shift==2){

                s->avctx->pix_fmt= AV_PIX_FMT_YUV410P;

            } else {

                av_log(s, AV_LOG_ERROR, "unsupported color subsample mode %d %d\n", s->chroma_h_shift, s->chroma_v_shift);

                s->chroma_h_shift = s->chroma_v_shift = 1;

                s->avctx->pix_fmt= AV_PIX_FMT_YUV420P;

                return AVERROR_INVALIDDATA;

            }

            s->nb_planes = 3;

        } else {

            av_log(s, AV_LOG_ERROR, "unsupported color space\n");

            s->chroma_h_shift = s->chroma_v_shift = 1;

            s->avctx->pix_fmt= AV_PIX_FMT_YUV420P;

            return AVERROR_INVALIDDATA;

        }





        s->spatial_scalability= get_rac(&s->c, s->header_state);

//        s->rate_scalability= get_rac(&s->c, s->header_state);

        GET_S(s->max_ref_frames, tmp < (unsigned)MAX_REF_FRAMES)

        s->max_ref_frames++;



        decode_qlogs(s);

    }



    if(!s->keyframe){

        if(get_rac(&s->c, s->header_state)){

            for(plane_index=0; plane_index<FFMIN(s->nb_planes, 2); plane_index++){

                int htaps, i, sum=0;

                Plane *p= &s->plane[plane_index];

                p->diag_mc= get_rac(&s->c, s->header_state);

                htaps= get_symbol(&s->c, s->header_state, 0)*2 + 2;

                if((unsigned)htaps >= HTAPS_MAX || htaps==0)

                    return AVERROR_INVALIDDATA;

                p->htaps= htaps;

                for(i= htaps/2; i; i--){

                    p->hcoeff[i]= get_symbol(&s->c, s->header_state, 0) * (1-2*(i&1));

                    sum += p->hcoeff[i];

                }

                p->hcoeff[0]= 32-sum;

            }

            s->plane[2].diag_mc= s->plane[1].diag_mc;

            s->plane[2].htaps  = s->plane[1].htaps;

            memcpy(s->plane[2].hcoeff, s->plane[1].hcoeff, sizeof(s->plane[1].hcoeff));

        }

        if(get_rac(&s->c, s->header_state)){

            GET_S(s->spatial_decomposition_count, 0 < tmp && tmp <= MAX_DECOMPOSITIONS)

            decode_qlogs(s);

        }

    }



    s->spatial_decomposition_type+= get_symbol(&s->c, s->header_state, 1);

    if(s->spatial_decomposition_type > 1U){

        av_log(s->avctx, AV_LOG_ERROR, "spatial_decomposition_type %d not supported\n", s->spatial_decomposition_type);

        return AVERROR_INVALIDDATA;

    }

    if(FFMIN(s->avctx-> width>>s->chroma_h_shift,

             s->avctx->height>>s->chroma_v_shift) >> (s->spatial_decomposition_count-1) <= 1){

        av_log(s->avctx, AV_LOG_ERROR, "spatial_decomposition_count %d too large for size\n", s->spatial_decomposition_count);

        return AVERROR_INVALIDDATA;

    }

    if (s->avctx->width > 65536-4) {

        av_log(s->avctx, AV_LOG_ERROR, "Width %d is too large\n", s->avctx->width);

        return AVERROR_INVALIDDATA;

    }





    s->qlog           += get_symbol(&s->c, s->header_state, 1);

    s->mv_scale       += get_symbol(&s->c, s->header_state, 1);

    s->qbias          += get_symbol(&s->c, s->header_state, 1);

    s->block_max_depth+= get_symbol(&s->c, s->header_state, 1);

    if(s->block_max_depth > 1 || s->block_max_depth < 0 || s->mv_scale > 256U){

        av_log(s->avctx, AV_LOG_ERROR, "block_max_depth= %d is too large\n", s->block_max_depth);

        s->block_max_depth= 0;

        s->mv_scale = 0;

        return AVERROR_INVALIDDATA;

    }

    if (FFABS(s->qbias) > 127) {

        av_log(s->avctx, AV_LOG_ERROR, "qbias %d is too large\n", s->qbias);

        s->qbias = 0;

        return AVERROR_INVALIDDATA;

    }



    return 0;

}

static int decode_header(SnowContext *s){

    int plane_index, tmp;

    uint8_t kstate[32];



    memset(kstate, MID_STATE, sizeof(kstate));



    s->keyframe= get_rac(&s->c, kstate);

    if(s->keyframe || s->always_reset){

        ff_snow_reset_contexts(s);

        s->spatial_decomposition_type=

        s->qlog=

        s->qbias=

        s->mv_scale=

        s->block_max_depth= 0;

    }

    if(s->keyframe){

        GET_S(s->version, tmp <= 0U)

        s->always_reset= get_rac(&s->c, s->header_state);

        s->temporal_decomposition_type= get_symbol(&s->c, s->header_state, 0);

        s->temporal_decomposition_count= get_symbol(&s->c, s->header_state, 0);

        GET_S(s->spatial_decomposition_count, 0 < tmp && tmp <= MAX_DECOMPOSITIONS)

        s->colorspace_type= get_symbol(&s->c, s->header_state, 0);

        if (s->colorspace_type == 1) {

            s->avctx->pix_fmt= AV_PIX_FMT_GRAY8;

            s->nb_planes = 1;

        } else if(s->colorspace_type == 0) {

            s->chroma_h_shift= get_symbol(&s->c, s->header_state, 0);

            s->chroma_v_shift= get_symbol(&s->c, s->header_state, 0);



            if(s->chroma_h_shift == 1 && s->chroma_v_shift==1){

                s->avctx->pix_fmt= AV_PIX_FMT_YUV420P;

            }else if(s->chroma_h_shift == 0 && s->chroma_v_shift==0){

                s->avctx->pix_fmt= AV_PIX_FMT_YUV444P;

            }else if(s->chroma_h_shift == 2 && s->chroma_v_shift==2){

                s->avctx->pix_fmt= AV_PIX_FMT_YUV410P;

            } else {

                av_log(s, AV_LOG_ERROR, "unsupported color subsample mode %d %d\n", s->chroma_h_shift, s->chroma_v_shift);

                s->chroma_h_shift = s->chroma_v_shift = 1;

                s->avctx->pix_fmt= AV_PIX_FMT_YUV420P;

                return AVERROR_INVALIDDATA;

            }

            s->nb_planes = 3;

        } else {

            av_log(s, AV_LOG_ERROR, "unsupported color space\n");

            s->chroma_h_shift = s->chroma_v_shift = 1;

            s->avctx->pix_fmt= AV_PIX_FMT_YUV420P;

            return AVERROR_INVALIDDATA;

        }





        s->spatial_scalability= get_rac(&s->c, s->header_state);



        GET_S(s->max_ref_frames, tmp < (unsigned)MAX_REF_FRAMES)

        s->max_ref_frames++;



        decode_qlogs(s);

    }



    if(!s->keyframe){

        if(get_rac(&s->c, s->header_state)){

            for(plane_index=0; plane_index<FFMIN(s->nb_planes, 2); plane_index++){

                int htaps, i, sum=0;

                Plane *p= &s->plane[plane_index];

                p->diag_mc= get_rac(&s->c, s->header_state);

                htaps= get_symbol(&s->c, s->header_state, 0)*2 + 2;

                if((unsigned)htaps >= HTAPS_MAX || htaps==0)

                    return AVERROR_INVALIDDATA;

                p->htaps= htaps;

                for(i= htaps/2; i; i--){

                    p->hcoeff[i]= get_symbol(&s->c, s->header_state, 0) * (1-2*(i&1));

                    sum += p->hcoeff[i];

                }

                p->hcoeff[0]= 32-sum;

            }

            s->plane[2].diag_mc= s->plane[1].diag_mc;

            s->plane[2].htaps  = s->plane[1].htaps;

            memcpy(s->plane[2].hcoeff, s->plane[1].hcoeff, sizeof(s->plane[1].hcoeff));

        }

        if(get_rac(&s->c, s->header_state)){

            GET_S(s->spatial_decomposition_count, 0 < tmp && tmp <= MAX_DECOMPOSITIONS)

            decode_qlogs(s);

        }

    }



    s->spatial_decomposition_type+= get_symbol(&s->c, s->header_state, 1);

    if(s->spatial_decomposition_type > 1U){

        av_log(s->avctx, AV_LOG_ERROR, "spatial_decomposition_type %d not supported\n", s->spatial_decomposition_type);

        return AVERROR_INVALIDDATA;

    }

    if(FFMIN(s->avctx-> width>>s->chroma_h_shift,

             s->avctx->height>>s->chroma_v_shift) >> (s->spatial_decomposition_count-1) <= 1){

        av_log(s->avctx, AV_LOG_ERROR, "spatial_decomposition_count %d too large for size\n", s->spatial_decomposition_count);

        return AVERROR_INVALIDDATA;

    }

    if (s->avctx->width > 65536-4) {

        av_log(s->avctx, AV_LOG_ERROR, "Width %d is too large\n", s->avctx->width);

        return AVERROR_INVALIDDATA;

    }





    s->qlog           += get_symbol(&s->c, s->header_state, 1);

    s->mv_scale       += get_symbol(&s->c, s->header_state, 1);

    s->qbias          += get_symbol(&s->c, s->header_state, 1);

    s->block_max_depth+= get_symbol(&s->c, s->header_state, 1);

    if(s->block_max_depth > 1 || s->block_max_depth < 0 || s->mv_scale > 256U){

        av_log(s->avctx, AV_LOG_ERROR, "block_max_depth= %d is too large\n", s->block_max_depth);

        s->block_max_depth= 0;

        s->mv_scale = 0;

        return AVERROR_INVALIDDATA;

    }

    if (FFABS(s->qbias) > 127) {

        av_log(s->avctx, AV_LOG_ERROR, "qbias %d is too large\n", s->qbias);

        s->qbias = 0;

        return AVERROR_INVALIDDATA;

    }



    return 0;

}

    s->spatial_decomposition_type+= get_symbol(&s->c, s->header_state, 1);     s->qlog           += get_symbol(&s->c, s->header_state, 1);     s->mv_scale       += get_symbol(&s->c, s->header_state, 1);     s->qbias          += get_symbol(&s->c, s->header_state, 1);     s->block_max_depth+= get_symbol(&s->c, s->header_state, 1);
static int FUNC_0(SnowContext *VAR_0){

    int VAR_1, VAR_2;

    uint8_t kstate[32];



    memset(kstate, MID_STATE, sizeof(kstate));



    VAR_0->keyframe= get_rac(&VAR_0->c, kstate);

    if(VAR_0->keyframe || VAR_0->always_reset){

        ff_snow_reset_contexts(VAR_0);

        VAR_0->spatial_decomposition_type=

        VAR_0->qlog=

        VAR_0->qbias=

        VAR_0->mv_scale=

        VAR_0->block_max_depth= 0;

    }

    if(VAR_0->keyframe){

        GET_S(VAR_0->version, VAR_2 <= 0U)

        VAR_0->always_reset= get_rac(&VAR_0->c, VAR_0->header_state);

        VAR_0->temporal_decomposition_type= get_symbol(&VAR_0->c, VAR_0->header_state, 0);

        VAR_0->temporal_decomposition_count= get_symbol(&VAR_0->c, VAR_0->header_state, 0);

        GET_S(VAR_0->spatial_decomposition_count, 0 < VAR_2 && VAR_2 <= MAX_DECOMPOSITIONS)

        VAR_0->colorspace_type= get_symbol(&VAR_0->c, VAR_0->header_state, 0);

        if (VAR_0->colorspace_type == 1) {

            VAR_0->avctx->pix_fmt= AV_PIX_FMT_GRAY8;

            VAR_0->nb_planes = 1;

        } else if(VAR_0->colorspace_type == 0) {

            VAR_0->chroma_h_shift= get_symbol(&VAR_0->c, VAR_0->header_state, 0);

            VAR_0->chroma_v_shift= get_symbol(&VAR_0->c, VAR_0->header_state, 0);



            if(VAR_0->chroma_h_shift == 1 && VAR_0->chroma_v_shift==1){

                VAR_0->avctx->pix_fmt= AV_PIX_FMT_YUV420P;

            }else if(VAR_0->chroma_h_shift == 0 && VAR_0->chroma_v_shift==0){

                VAR_0->avctx->pix_fmt= AV_PIX_FMT_YUV444P;

            }else if(VAR_0->chroma_h_shift == 2 && VAR_0->chroma_v_shift==2){

                VAR_0->avctx->pix_fmt= AV_PIX_FMT_YUV410P;

            } else {

                av_log(VAR_0, AV_LOG_ERROR, "unsupported color subsample mode %d %d\n", VAR_0->chroma_h_shift, VAR_0->chroma_v_shift);

                VAR_0->chroma_h_shift = VAR_0->chroma_v_shift = 1;

                VAR_0->avctx->pix_fmt= AV_PIX_FMT_YUV420P;

                return AVERROR_INVALIDDATA;

            }

            VAR_0->nb_planes = 3;

        } else {

            av_log(VAR_0, AV_LOG_ERROR, "unsupported color space\n");

            VAR_0->chroma_h_shift = VAR_0->chroma_v_shift = 1;

            VAR_0->avctx->pix_fmt= AV_PIX_FMT_YUV420P;

            return AVERROR_INVALIDDATA;

        }





        VAR_0->spatial_scalability= get_rac(&VAR_0->c, VAR_0->header_state);



        GET_S(VAR_0->max_ref_frames, VAR_2 < (unsigned)MAX_REF_FRAMES)

        VAR_0->max_ref_frames++;



        decode_qlogs(VAR_0);

    }



    if(!VAR_0->keyframe){

        if(get_rac(&VAR_0->c, VAR_0->header_state)){

            for(VAR_1=0; VAR_1<FFMIN(VAR_0->nb_planes, 2); VAR_1++){

                int htaps, i, sum=0;

                Plane *p= &VAR_0->plane[VAR_1];

                p->diag_mc= get_rac(&VAR_0->c, VAR_0->header_state);

                htaps= get_symbol(&VAR_0->c, VAR_0->header_state, 0)*2 + 2;

                if((unsigned)htaps >= HTAPS_MAX || htaps==0)

                    return AVERROR_INVALIDDATA;

                p->htaps= htaps;

                for(i= htaps/2; i; i--){

                    p->hcoeff[i]= get_symbol(&VAR_0->c, VAR_0->header_state, 0) * (1-2*(i&1));

                    sum += p->hcoeff[i];

                }

                p->hcoeff[0]= 32-sum;

            }

            VAR_0->plane[2].diag_mc= VAR_0->plane[1].diag_mc;

            VAR_0->plane[2].htaps  = VAR_0->plane[1].htaps;

            memcpy(VAR_0->plane[2].hcoeff, VAR_0->plane[1].hcoeff, sizeof(VAR_0->plane[1].hcoeff));

        }

        if(get_rac(&VAR_0->c, VAR_0->header_state)){

            GET_S(VAR_0->spatial_decomposition_count, 0 < VAR_2 && VAR_2 <= MAX_DECOMPOSITIONS)

            decode_qlogs(VAR_0);

        }

    }



    VAR_0->spatial_decomposition_type+= get_symbol(&VAR_0->c, VAR_0->header_state, 1);

    if(VAR_0->spatial_decomposition_type > 1U){

        av_log(VAR_0->avctx, AV_LOG_ERROR, "spatial_decomposition_type %d not supported\n", VAR_0->spatial_decomposition_type);

        return AVERROR_INVALIDDATA;

    }

    if(FFMIN(VAR_0->avctx-> width>>VAR_0->chroma_h_shift,

             VAR_0->avctx->height>>VAR_0->chroma_v_shift) >> (VAR_0->spatial_decomposition_count-1) <= 1){

        av_log(VAR_0->avctx, AV_LOG_ERROR, "spatial_decomposition_count %d too large for size\n", VAR_0->spatial_decomposition_count);

        return AVERROR_INVALIDDATA;

    }

    if (VAR_0->avctx->width > 65536-4) {

        av_log(VAR_0->avctx, AV_LOG_ERROR, "Width %d is too large\n", VAR_0->avctx->width);

        return AVERROR_INVALIDDATA;

    }





    VAR_0->qlog           += get_symbol(&VAR_0->c, VAR_0->header_state, 1);

    VAR_0->mv_scale       += get_symbol(&VAR_0->c, VAR_0->header_state, 1);

    VAR_0->qbias          += get_symbol(&VAR_0->c, VAR_0->header_state, 1);

    VAR_0->block_max_depth+= get_symbol(&VAR_0->c, VAR_0->header_state, 1);

    if(VAR_0->block_max_depth > 1 || VAR_0->block_max_depth < 0 || VAR_0->mv_scale > 256U){

        av_log(VAR_0->avctx, AV_LOG_ERROR, "block_max_depth= %d is too large\n", VAR_0->block_max_depth);

        VAR_0->block_max_depth= 0;

        VAR_0->mv_scale = 0;

        return AVERROR_INVALIDDATA;

    }

    if (FFABS(VAR_0->qbias) > 127) {

        av_log(VAR_0->avctx, AV_LOG_ERROR, "qbias %d is too large\n", VAR_0->qbias);

        VAR_0->qbias = 0;

        return AVERROR_INVALIDDATA;

    }



    return 0;

}

static int FUNC_0(SnowContext *VAR_0){ int VAR_1, VAR_2; uint8_t kstate[32]; memset(kstate, MID_STATE, sizeof(kstate)); VAR_0->keyframe= get_rac(&VAR_0->c, kstate); if(VAR_0->keyframe || VAR_0->always_reset){ ff_snow_reset_contexts(VAR_0); VAR_0->spatial_decomposition_type=
VAR_0->qlog=
VAR_0->qbias=
VAR_0->mv_scale=
VAR_0->block_max_depth= 0; } if(VAR_0->keyframe){ GET_S(VAR_0->version, VAR_2 <= 0U)
VAR_0->always_reset= get_rac(&VAR_0->c, VAR_0->header_state); VAR_0->temporal_decomposition_type= get_symbol(&VAR_0->c, VAR_0->header_state, 0); VAR_0->temporal_decomposition_count= get_symbol(&VAR_0->c, VAR_0->header_state, 0); GET_S(VAR_0->spatial_decomposition_count, 0 < VAR_2 && VAR_2 <= MAX_DECOMPOSITIONS)
VAR_0->colorspace_type= get_symbol(&VAR_0->c, VAR_0->header_state, 0); if (VAR_0->colorspace_type == 1) { VAR_0->avctx->pix_fmt= AV_PIX_FMT_GRAY8; VAR_0->nb_planes = 1; } else if(VAR_0->colorspace_type == 0) { VAR_0->chroma_h_shift= get_symbol(&VAR_0->c, VAR_0->header_state, 0); VAR_0->chroma_v_shift= get_symbol(&VAR_0->c, VAR_0->header_state, 0); if(VAR_0->chroma_h_shift == 1 && VAR_0->chroma_v_shift==1){ VAR_0->avctx->pix_fmt= AV_PIX_FMT_YUV420P; }else if(VAR_0->chroma_h_shift == 0 && VAR_0->chroma_v_shift==0){ VAR_0->avctx->pix_fmt= AV_PIX_FMT_YUV444P; }else if(VAR_0->chroma_h_shift == 2 && VAR_0->chroma_v_shift==2){ VAR_0->avctx->pix_fmt= AV_PIX_FMT_YUV410P; } else { av_log(VAR_0, AV_LOG_ERROR, "unsupported color subsample mode %d %d\n", VAR_0->chroma_h_shift, VAR_0->chroma_v_shift); VAR_0->chroma_h_shift = VAR_0->chroma_v_shift = 1; VAR_0->avctx->pix_fmt= AV_PIX_FMT_YUV420P; return AVERROR_INVALIDDATA; } VAR_0->nb_planes = 3; } else { av_log(VAR_0, AV_LOG_ERROR, "unsupported color space\n"); VAR_0->chroma_h_shift = VAR_0->chroma_v_shift = 1; VAR_0->avctx->pix_fmt= AV_PIX_FMT_YUV420P; return AVERROR_INVALIDDATA; } VAR_0->spatial_scalability= get_rac(&VAR_0->c, VAR_0->header_state); GET_S(VAR_0->max_ref_frames, VAR_2 < (unsigned)MAX_REF_FRAMES)
VAR_0->max_ref_frames++; decode_qlogs(VAR_0); } if(!VAR_0->keyframe){ if(get_rac(&VAR_0->c, VAR_0->header_state)){ for(VAR_1=0; VAR_1<FFMIN(VAR_0->nb_planes, 2); VAR_1++){ int htaps, i, sum=0; Plane *p= &VAR_0->plane[VAR_1]; p->diag_mc= get_rac(&VAR_0->c, VAR_0->header_state); htaps= get_symbol(&VAR_0->c, VAR_0->header_state, 0)*2 + 2; if((unsigned)htaps >= HTAPS_MAX || htaps==0)
return AVERROR_INVALIDDATA; p->htaps= htaps; for(i= htaps/2; i; i--){ p->hcoeff[i]= get_symbol(&VAR_0->c, VAR_0->header_state, 0) * (1-2*(i&1)); sum += p->hcoeff[i]; } p->hcoeff[0]= 32-sum; } VAR_0->plane[2].diag_mc= VAR_0->plane[1].diag_mc; VAR_0->plane[2].htaps  = VAR_0->plane[1].htaps; memcpy(VAR_0->plane[2].hcoeff, VAR_0->plane[1].hcoeff, sizeof(VAR_0->plane[1].hcoeff)); } if(get_rac(&VAR_0->c, VAR_0->header_state)){ GET_S(VAR_0->spatial_decomposition_count, 0 < VAR_2 && VAR_2 <= MAX_DECOMPOSITIONS)
decode_qlogs(VAR_0); } } VAR_0->spatial_decomposition_type+= get_symbol(&VAR_0->c, VAR_0->header_state, 1); if(VAR_0->spatial_decomposition_type > 1U){ av_log(VAR_0->avctx, AV_LOG_ERROR, "spatial_decomposition_type %d not supported\n", VAR_0->spatial_decomposition_type); return AVERROR_INVALIDDATA; } if(FFMIN(VAR_0->avctx-> width>>VAR_0->chroma_h_shift,
VAR_0->avctx->height>>VAR_0->chroma_v_shift) >> (VAR_0->spatial_decomposition_count-1) <= 1){ av_log(VAR_0->avctx, AV_LOG_ERROR, "spatial_decomposition_count %d too large for size\n", VAR_0->spatial_decomposition_count); return AVERROR_INVALIDDATA; } if (VAR_0->avctx->width > 65536-4) { av_log(VAR_0->avctx, AV_LOG_ERROR, "Width %d is too large\n", VAR_0->avctx->width); return AVERROR_INVALIDDATA; } VAR_0->qlog           += get_symbol(&VAR_0->c, VAR_0->header_state, 1); VAR_0->mv_scale       += get_symbol(&VAR_0->c, VAR_0->header_state, 1); VAR_0->qbias          += get_symbol(&VAR_0->c, VAR_0->header_state, 1); VAR_0->block_max_depth+= get_symbol(&VAR_0->c, VAR_0->header_state, 1); if(VAR_0->block_max_depth > 1 || VAR_0->block_max_depth < 0 || VAR_0->mv_scale > 256U){ av_log(VAR_0->avctx, AV_LOG_ERROR, "block_max_depth= %d is too large\n", VAR_0->block_max_depth); VAR_0->block_max_depth= 0; VAR_0->mv_scale = 0; return AVERROR_INVALIDDATA; } if (FFABS(VAR_0->qbias) > 127) { av_log(VAR_0->avctx, AV_LOG_ERROR, "qbias %d is too large\n", VAR_0->qbias); VAR_0->qbias = 0; return AVERROR_INVALIDDATA; } return 0; }