static void postprocess_chroma(AVFrame *frame, int w, int h, int depth)

{

    uint16_t *dstu = (uint16_t *)frame->data[1];

    uint16_t *dstv = (uint16_t *)frame->data[2];

    int16_t *srcu  = (int16_t *)frame->data[1];

    int16_t *srcv  = (int16_t *)frame->data[2];

    ptrdiff_t strideu = frame->linesize[1] / 2;

    ptrdiff_t stridev = frame->linesize[2] / 2;

    const int add = 1 << (depth - 1);

    const int shift = 16 - depth;

    int i, j;



    for (j = 0; j < h; j++) {

        for (i = 0; i < w; i++) {

            dstu[i] = (add + srcu[i]) << shift;

            dstv[i] = (add + srcv[i]) << shift;

        }

        dstu += strideu;

        dstv += stridev;

        srcu += strideu;

        srcv += stridev;

    }

}

static void postprocess_chroma(AVFrame *frame, int w, int h, int depth)

{

    uint16_t *dstu = (uint16_t *)frame->data[1];

    uint16_t *dstv = (uint16_t *)frame->data[2];

    int16_t *srcu  = (int16_t *)frame->data[1];

    int16_t *srcv  = (int16_t *)frame->data[2];

    ptrdiff_t strideu = frame->linesize[1] / 2;

    ptrdiff_t stridev = frame->linesize[2] / 2;

    const int add = 1 << (depth - 1);

    const int shift = 16 - depth;

    int i, j;



    for (j = 0; j < h; j++) {

        for (i = 0; i < w; i++) {

            dstu[i] = (add + srcu[i]) << shift;

            dstv[i] = (add + srcv[i]) << shift;

        }

        dstu += strideu;

        dstv += stridev;

        srcu += strideu;

        srcv += stridev;

    }

}

    const int add = 1 << (depth - 1);     const int shift = 16 - depth;
static void FUNC_0(AVFrame *VAR_0, int VAR_1, int VAR_2, int VAR_3)

{

    uint16_t *dstu = (uint16_t *)VAR_0->data[1];

    uint16_t *dstv = (uint16_t *)VAR_0->data[2];

    int16_t *srcu  = (int16_t *)VAR_0->data[1];

    int16_t *srcv  = (int16_t *)VAR_0->data[2];

    ptrdiff_t strideu = VAR_0->linesize[1] / 2;

    ptrdiff_t stridev = VAR_0->linesize[2] / 2;

    const int VAR_4 = 1 << (VAR_3 - 1);

    const int VAR_5 = 16 - VAR_3;

    int VAR_6, VAR_7;



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

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

            dstu[VAR_6] = (VAR_4 + srcu[VAR_6]) << VAR_5;

            dstv[VAR_6] = (VAR_4 + srcv[VAR_6]) << VAR_5;

        }

        dstu += strideu;

        dstv += stridev;

        srcu += strideu;

        srcv += stridev;

    }

}

static void FUNC_0(AVFrame *VAR_0, int VAR_1, int VAR_2, int VAR_3)
{ uint16_t *dstu = (uint16_t *)VAR_0->data[1]; uint16_t *dstv = (uint16_t *)VAR_0->data[2]; int16_t *srcu  = (int16_t *)VAR_0->data[1]; int16_t *srcv  = (int16_t *)VAR_0->data[2]; ptrdiff_t strideu = VAR_0->linesize[1] / 2; ptrdiff_t stridev = VAR_0->linesize[2] / 2; const int VAR_4 = 1 << (VAR_3 - 1); const int VAR_5 = 16 - VAR_3; int VAR_6, VAR_7; for (VAR_7 = 0; VAR_7 < VAR_2; VAR_7++) { for (VAR_6 = 0; VAR_6 < VAR_1; VAR_6++) { dstu[VAR_6] = (VAR_4 + srcu[VAR_6]) << VAR_5; dstv[VAR_6] = (VAR_4 + srcv[VAR_6]) << VAR_5; } dstu += strideu; dstv += stridev; srcu += strideu; srcv += stridev; } }