static void choose_pixel_fmt(AVStream *st, AVCodec *codec)

{

    if(codec && codec->pix_fmts){

        const enum PixelFormat *p= codec->pix_fmts;

        if(st->codec->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL){

            if(st->codec->codec_id==CODEC_ID_MJPEG){

                p= (const enum PixelFormat[]){PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_NONE};

            }else if(st->codec->codec_id==CODEC_ID_LJPEG){

                p= (const enum PixelFormat[]){PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ444P, PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_YUV444P, PIX_FMT_BGRA, PIX_FMT_NONE};

            }

        }

        for(; *p!=-1; p++){

            if(*p == st->codec->pix_fmt)

                break;

        }

        if (*p == -1) {


            av_log(NULL, AV_LOG_WARNING,

                   "Incompatible pixel format '%s' for codec '%s', auto-selecting format '%s'\n",

                   av_pix_fmt_descriptors[st->codec->pix_fmt].name,

                   codec->name,

                   av_pix_fmt_descriptors[codec->pix_fmts[0]].name);

            st->codec->pix_fmt = codec->pix_fmts[0];

        }

    }

}
static void choose_pixel_fmt(AVStream *st, AVCodec *codec)

{

    if(codec && codec->pix_fmts){

        const enum PixelFormat *p= codec->pix_fmts;

        if(st->codec->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL){

            if(st->codec->codec_id==CODEC_ID_MJPEG){

                p= (const enum PixelFormat[]){PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_NONE};

            }else if(st->codec->codec_id==CODEC_ID_LJPEG){

                p= (const enum PixelFormat[]){PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ444P, PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_YUV444P, PIX_FMT_BGRA, PIX_FMT_NONE};

            }

        }

        for(; *p!=-1; p++){

            if(*p == st->codec->pix_fmt)

                break;

        }

        if (*p == -1) {


            av_log(NULL, AV_LOG_WARNING,

                   "Incompatible pixel format '%s' for codec '%s', auto-selecting format '%s'\n",

                   av_pix_fmt_descriptors[st->codec->pix_fmt].name,

                   codec->name,

                   av_pix_fmt_descriptors[codec->pix_fmts[0]].name);

            st->codec->pix_fmt = codec->pix_fmts[0];

        }

    }

}
static void FUNC_0(AVStream *VAR_0, AVCodec *VAR_1)

{

    if(VAR_1 && VAR_1->pix_fmts){

        const enum PixelFormat *VAR_2= VAR_1->pix_fmts;

        if(VAR_0->VAR_1->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL){

            if(VAR_0->VAR_1->codec_id==CODEC_ID_MJPEG){

                VAR_2= (const enum PixelFormat[]){PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_NONE};

            }else if(VAR_0->VAR_1->codec_id==CODEC_ID_LJPEG){

                VAR_2= (const enum PixelFormat[]){PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ444P, PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_YUV444P, PIX_FMT_BGRA, PIX_FMT_NONE};

            }

        }

        for(; *VAR_2!=-1; VAR_2++){

            if(*VAR_2 == VAR_0->VAR_1->pix_fmt)

                break;

        }

        if (*VAR_2 == -1) {


            av_log(NULL, AV_LOG_WARNING,

                   "Incompatible pixel format '%s' for VAR_1 '%s', auto-selecting format '%s'\n",

                   av_pix_fmt_descriptors[VAR_0->VAR_1->pix_fmt].name,

                   VAR_1->name,

                   av_pix_fmt_descriptors[VAR_1->pix_fmts[0]].name);

            VAR_0->VAR_1->pix_fmt = VAR_1->pix_fmts[0];

        }

    }

}
static void FUNC_0(AVStream *VAR_0, AVCodec *VAR_1)
{ if(VAR_1 && VAR_1->pix_fmts){ const enum PixelFormat *VAR_2= VAR_1->pix_fmts; if(VAR_0->VAR_1->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL){ if(VAR_0->VAR_1->codec_id==CODEC_ID_MJPEG){ VAR_2= (const enum PixelFormat[]){PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_NONE}; }else if(VAR_0->VAR_1->codec_id==CODEC_ID_LJPEG){ VAR_2= (const enum PixelFormat[]){PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ444P, PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_YUV444P, PIX_FMT_BGRA, PIX_FMT_NONE}; } } for(; *VAR_2!=-1; VAR_2++){ if(*VAR_2 == VAR_0->VAR_1->pix_fmt)
break; } if (*VAR_2 == -1) { av_log(NULL, AV_LOG_WARNING,
"Incompatible pixel format '%s' for VAR_1 '%s', auto-selecting format '%s'\n",
av_pix_fmt_descriptors[VAR_0->VAR_1->pix_fmt].name,
VAR_1->name,
av_pix_fmt_descriptors[VAR_1->pix_fmts[0]].name); VAR_0->VAR_1->pix_fmt = VAR_1->pix_fmts[0]; } } }