static int set_chroma_format(AVCodecContext *avctx)

{

    int num_formats = sizeof(schro_pixel_format_map) /

                      sizeof(schro_pixel_format_map[0]);

    int idx;



    SchroEncoderParams *p_schro_params = avctx->priv_data;



    for (idx = 0; idx < num_formats; ++idx) {

        if (schro_pixel_format_map[idx].ff_pix_fmt == avctx->pix_fmt) {

            p_schro_params->format->chroma_format =

                            schro_pixel_format_map[idx].schro_pix_fmt;

            return 0;

        }

    }



    av_log(avctx, AV_LOG_ERROR,

           "This codec currently only supports planar YUV 4:2:0, 4:2:2"

           " and 4:4:4 formats.\n");



    return -1;

}

static int set_chroma_format(AVCodecContext *avctx)

{

    int num_formats = sizeof(schro_pixel_format_map) /

                      sizeof(schro_pixel_format_map[0]);

    int idx;



    SchroEncoderParams *p_schro_params = avctx->priv_data;



    for (idx = 0; idx < num_formats; ++idx) {

        if (schro_pixel_format_map[idx].ff_pix_fmt == avctx->pix_fmt) {

            p_schro_params->format->chroma_format =

                            schro_pixel_format_map[idx].schro_pix_fmt;

            return 0;

        }

    }



    av_log(avctx, AV_LOG_ERROR,

           "This codec currently only supports planar YUV 4:2:0, 4:2:2"

           " and 4:4:4 formats.\n");



    return -1;

}

    int idx;     for (idx = 0; idx < num_formats; ++idx) {             return 0;     return -1;     int num_formats = sizeof(schro_pixel_format_map) /                       sizeof(schro_pixel_format_map[0]);     int idx; static int set_chroma_format(AVCodecContext *avctx)     int num_formats = sizeof(schro_pixel_format_map) /                       sizeof(schro_pixel_format_map[0]);     int idx;     SchroEncoderParams *p_schro_params = avctx->priv_data;     for (idx = 0; idx < num_formats; ++idx) {         if (schro_pixel_format_map[idx].ff_pix_fmt == avctx->pix_fmt) {             p_schro_params->format->chroma_format =                             schro_pixel_format_map[idx].schro_pix_fmt;             return 0;     av_log(avctx, AV_LOG_ERROR,            "This codec currently only supports planar YUV 4:2:0, 4:2:2"            " and 4:4:4 formats.\n");     return -1;     SchroEncoderParams *p_schro_params = avctx->priv_data;     SchroEncoderParams *p_schro_params = avctx->priv_data;     SchroEncoderParams *p_schro_params = avctx->priv_data;     SchroEncoderParams *p_schro_params = avctx->priv_data;
static int FUNC_0(AVCodecContext *VAR_0)

{

    int VAR_1 = sizeof(schro_pixel_format_map) /

                      sizeof(schro_pixel_format_map[0]);

    int VAR_2;



    SchroEncoderParams *p_schro_params = VAR_0->priv_data;



    for (VAR_2 = 0; VAR_2 < VAR_1; ++VAR_2) {

        if (schro_pixel_format_map[VAR_2].ff_pix_fmt == VAR_0->pix_fmt) {

            p_schro_params->format->chroma_format =

                            schro_pixel_format_map[VAR_2].schro_pix_fmt;

            return 0;

        }

    }



    av_log(VAR_0, AV_LOG_ERROR,

           "This codec currently only supports planar YUV 4:2:0, 4:2:2"

           " and 4:4:4 formats.\n");



    return -1;

}

static int FUNC_0(AVCodecContext *VAR_0)
{ int VAR_1 = sizeof(schro_pixel_format_map) /
sizeof(schro_pixel_format_map[0]); int VAR_2; SchroEncoderParams *p_schro_params = VAR_0->priv_data; for (VAR_2 = 0; VAR_2 < VAR_1; ++VAR_2) { if (schro_pixel_format_map[VAR_2].ff_pix_fmt == VAR_0->pix_fmt) { p_schro_params->format->chroma_format =
schro_pixel_format_map[VAR_2].schro_pix_fmt; return 0; } } av_log(VAR_0, AV_LOG_ERROR,
"This codec currently only supports planar YUV 4:2:0, 4:2:2"
" and 4:4:4 formats.\n"); return -1; }