static void fill_yuv_image(AVFrame *pict, int frame_index,

                           int width, int height)

{

    int x, y, i, ret;



    /* when we pass a frame to the encoder, it may keep a reference to it

     * internally;

     * make sure we do not overwrite it here

     */

    ret = av_frame_make_writable(pict);

    if (ret < 0)

        exit(1);



    i = frame_index;



    /* Y */

    for (y = 0; y < height; y++)

        for (x = 0; x < width; x++)

            pict->data[0][y * pict->linesize[0] + x] = x + y + i * 3;



    /* Cb and Cr */

    for (y = 0; y < height / 2; y++) {

        for (x = 0; x < width / 2; x++) {

            pict->data[1][y * pict->linesize[1] + x] = 128 + y + i * 2;

            pict->data[2][y * pict->linesize[2] + x] = 64 + x + i * 5;

        }

    }

}

static void fill_yuv_image(AVFrame *pict, int frame_index,

                           int width, int height)

{

    int x, y, i, ret;



    







    ret = av_frame_make_writable(pict);

    if (ret < 0)

        exit(1);



    i = frame_index;



    

    for (y = 0; y < height; y++)

        for (x = 0; x < width; x++)

            pict->data[0][y * pict->linesize[0] + x] = x + y + i * 3;



    

    for (y = 0; y < height / 2; y++) {

        for (x = 0; x < width / 2; x++) {

            pict->data[1][y * pict->linesize[1] + x] = 128 + y + i * 2;

            pict->data[2][y * pict->linesize[2] + x] = 64 + x + i * 5;

        }

    }

}

    int x, y, i, ret;     ret = av_frame_make_writable(pict);     if (ret < 0)         exit(1);
static void FUNC_0(AVFrame *VAR_0, int VAR_1,

                           int VAR_2, int VAR_3)

{

    int VAR_4, VAR_5, VAR_6, VAR_7;



    







    VAR_7 = av_frame_make_writable(VAR_0);

    if (VAR_7 < 0)

        exit(1);



    VAR_6 = VAR_1;



    

    for (VAR_5 = 0; VAR_5 < VAR_3; VAR_5++)

        for (VAR_4 = 0; VAR_4 < VAR_2; VAR_4++)

            VAR_0->data[0][VAR_5 * VAR_0->linesize[0] + VAR_4] = VAR_4 + VAR_5 + VAR_6 * 3;



    

    for (VAR_5 = 0; VAR_5 < VAR_3 / 2; VAR_5++) {

        for (VAR_4 = 0; VAR_4 < VAR_2 / 2; VAR_4++) {

            VAR_0->data[1][VAR_5 * VAR_0->linesize[1] + VAR_4] = 128 + VAR_5 + VAR_6 * 2;

            VAR_0->data[2][VAR_5 * VAR_0->linesize[2] + VAR_4] = 64 + VAR_4 + VAR_6 * 5;

        }

    }

}

static void FUNC_0(AVFrame *VAR_0, int VAR_1,
int VAR_2, int VAR_3)
{ int VAR_4, VAR_5, VAR_6, VAR_7; VAR_7 = av_frame_make_writable(VAR_0); if (VAR_7 < 0)
exit(1); VAR_6 = VAR_1; for (VAR_5 = 0; VAR_5 < VAR_3; VAR_5++) for (VAR_4 = 0; VAR_4 < VAR_2; VAR_4++) VAR_0->data[0][VAR_5 * VAR_0->linesize[0] + VAR_4] = VAR_4 + VAR_5 + VAR_6 * 3; for (VAR_5 = 0; VAR_5 < VAR_3 / 2; VAR_5++) { for (VAR_4 = 0; VAR_4 < VAR_2 / 2; VAR_4++) { VAR_0->data[1][VAR_5 * VAR_0->linesize[1] + VAR_4] = 128 + VAR_5 + VAR_6 * 2; VAR_0->data[2][VAR_5 * VAR_0->linesize[2] + VAR_4] = 64 + VAR_4 + VAR_6 * 5; } } }