static void update_sono_yuv(AVFrame *sono, const ColorFloat *c, int idx)

{

    int x, fmt = sono->format, w = sono->width;

    uint8_t *lpy = sono->data[0] + idx * sono->linesize[0];

    uint8_t *lpu = sono->data[1] + idx * sono->linesize[1];

    uint8_t *lpv = sono->data[2] + idx * sono->linesize[2];



    for (x = 0; x < w; x += 2) {

        *lpy++ = c[x].yuv.y + 0.5f;

        *lpu++ = c[x].yuv.u + 0.5f;

        *lpv++ = c[x].yuv.v + 0.5f;

        *lpy++ = c[x+1].yuv.y + 0.5f;

        if (fmt == AV_PIX_FMT_YUV444P) {

            *lpu++ = c[x+1].yuv.u + 0.5f;

            *lpv++ = c[x+1].yuv.v + 0.5f;

        }

    }

}

static void update_sono_yuv(AVFrame *sono, const ColorFloat *c, int idx)

{

    int x, fmt = sono->format, w = sono->width;

    uint8_t *lpy = sono->data[0] + idx * sono->linesize[0];

    uint8_t *lpu = sono->data[1] + idx * sono->linesize[1];

    uint8_t *lpv = sono->data[2] + idx * sono->linesize[2];



    for (x = 0; x < w; x += 2) {

        *lpy++ = c[x].yuv.y + 0.5f;

        *lpu++ = c[x].yuv.u + 0.5f;

        *lpv++ = c[x].yuv.v + 0.5f;

        *lpy++ = c[x+1].yuv.y + 0.5f;

        if (fmt == AV_PIX_FMT_YUV444P) {

            *lpu++ = c[x+1].yuv.u + 0.5f;

            *lpv++ = c[x+1].yuv.v + 0.5f;

        }

    }

}

static void FUNC_0(AVFrame *VAR_0, const ColorFloat *VAR_1, int VAR_2)

{

    int VAR_3, VAR_4 = VAR_0->format, VAR_5 = VAR_0->width;

    uint8_t *lpy = VAR_0->data[0] + VAR_2 * VAR_0->linesize[0];

    uint8_t *lpu = VAR_0->data[1] + VAR_2 * VAR_0->linesize[1];

    uint8_t *lpv = VAR_0->data[2] + VAR_2 * VAR_0->linesize[2];



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

        *lpy++ = VAR_1[VAR_3].yuv.y + 0.5f;

        *lpu++ = VAR_1[VAR_3].yuv.u + 0.5f;

        *lpv++ = VAR_1[VAR_3].yuv.v + 0.5f;

        *lpy++ = VAR_1[VAR_3+1].yuv.y + 0.5f;

        if (VAR_4 == AV_PIX_FMT_YUV444P) {

            *lpu++ = VAR_1[VAR_3+1].yuv.u + 0.5f;

            *lpv++ = VAR_1[VAR_3+1].yuv.v + 0.5f;

        }

    }

}

static void FUNC_0(AVFrame *VAR_0, const ColorFloat *VAR_1, int VAR_2)
{ int VAR_3, VAR_4 = VAR_0->format, VAR_5 = VAR_0->width; uint8_t *lpy = VAR_0->data[0] + VAR_2 * VAR_0->linesize[0]; uint8_t *lpu = VAR_0->data[1] + VAR_2 * VAR_0->linesize[1]; uint8_t *lpv = VAR_0->data[2] + VAR_2 * VAR_0->linesize[2]; for (VAR_3 = 0; VAR_3 < VAR_5; VAR_3 += 2) { *lpy++ = VAR_1[VAR_3].yuv.y + 0.5f; *lpu++ = VAR_1[VAR_3].yuv.u + 0.5f; *lpv++ = VAR_1[VAR_3].yuv.v + 0.5f; *lpy++ = VAR_1[VAR_3+1].yuv.y + 0.5f; if (VAR_4 == AV_PIX_FMT_YUV444P) { *lpu++ = VAR_1[VAR_3+1].yuv.u + 0.5f; *lpv++ = VAR_1[VAR_3+1].yuv.v + 0.5f; } } }