static void validate_thread_parameters(AVCodecContext *avctx)

{

    int frame_threading_supported = (avctx->codec->capabilities & CODEC_CAP_FRAME_THREADS)

                                && !(avctx->flags & CODEC_FLAG_TRUNCATED)

                                && !(avctx->flags & CODEC_FLAG_LOW_DELAY)

                                && !(avctx->flags2 & CODEC_FLAG2_CHUNKS);

    if (avctx->thread_count == 1) {

        avctx->active_thread_type = 0;

    } else if (frame_threading_supported && (avctx->thread_type & FF_THREAD_FRAME)) {

        avctx->active_thread_type = FF_THREAD_FRAME;

    } else {

        avctx->active_thread_type = FF_THREAD_SLICE;

    }

}

static void validate_thread_parameters(AVCodecContext *avctx)

{

    int frame_threading_supported = (avctx->codec->capabilities & CODEC_CAP_FRAME_THREADS)

                                && !(avctx->flags & CODEC_FLAG_TRUNCATED)

                                && !(avctx->flags & CODEC_FLAG_LOW_DELAY)

                                && !(avctx->flags2 & CODEC_FLAG2_CHUNKS);

    if (avctx->thread_count == 1) {

        avctx->active_thread_type = 0;

    } else if (frame_threading_supported && (avctx->thread_type & FF_THREAD_FRAME)) {

        avctx->active_thread_type = FF_THREAD_FRAME;

    } else {

        avctx->active_thread_type = FF_THREAD_SLICE;

    }

}

static void FUNC_0(AVCodecContext *VAR_0)

{

    int VAR_1 = (VAR_0->codec->capabilities & CODEC_CAP_FRAME_THREADS)

                                && !(VAR_0->flags & CODEC_FLAG_TRUNCATED)

                                && !(VAR_0->flags & CODEC_FLAG_LOW_DELAY)

                                && !(VAR_0->flags2 & CODEC_FLAG2_CHUNKS);

    if (VAR_0->thread_count == 1) {

        VAR_0->active_thread_type = 0;

    } else if (VAR_1 && (VAR_0->thread_type & FF_THREAD_FRAME)) {

        VAR_0->active_thread_type = FF_THREAD_FRAME;

    } else {

        VAR_0->active_thread_type = FF_THREAD_SLICE;

    }

}

static void FUNC_0(AVCodecContext *VAR_0)
{ int VAR_1 = (VAR_0->codec->capabilities & CODEC_CAP_FRAME_THREADS)
&& !(VAR_0->flags & CODEC_FLAG_TRUNCATED)
&& !(VAR_0->flags & CODEC_FLAG_LOW_DELAY)
&& !(VAR_0->flags2 & CODEC_FLAG2_CHUNKS); if (VAR_0->thread_count == 1) { VAR_0->active_thread_type = 0; } else if (VAR_1 && (VAR_0->thread_type & FF_THREAD_FRAME)) { VAR_0->active_thread_type = FF_THREAD_FRAME; } else { VAR_0->active_thread_type = FF_THREAD_SLICE; } }