static void FUNC(hevc_loop_filter_chroma)(uint8_t *_pix, ptrdiff_t _xstride,

                                          ptrdiff_t _ystride, int *_tc,

                                          uint8_t *_no_p, uint8_t *_no_q)

{

    int d, j, no_p, no_q;

    pixel *pix        = (pixel *)_pix;

    ptrdiff_t xstride = _xstride / sizeof(pixel);

    ptrdiff_t ystride = _ystride / sizeof(pixel);



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

        const int tc = _tc[j] << (BIT_DEPTH - 8);

        if (tc <= 0) {

            pix += 4 * ystride;

            continue;

        }

        no_p = _no_p[j];

        no_q = _no_q[j];



        for (d = 0; d < 4; d++) {

            int delta0;

            const int p1 = P1;

            const int p0 = P0;

            const int q0 = Q0;

            const int q1 = Q1;

            delta0 = av_clip((((q0 - p0) << 2) + p1 - q1 + 4) >> 3, -tc, tc);

            if (!no_p)

                P0 = av_clip_pixel(p0 + delta0);

            if (!no_q)

                Q0 = av_clip_pixel(q0 - delta0);

            pix += ystride;

        }

    }

}

static void FUNC(hevc_loop_filter_chroma)(uint8_t *_pix, ptrdiff_t _xstride,

                                          ptrdiff_t _ystride, int *_tc,

                                          uint8_t *_no_p, uint8_t *_no_q)

{

    int d, j, no_p, no_q;

    pixel *pix        = (pixel *)_pix;

    ptrdiff_t xstride = _xstride / sizeof(pixel);

    ptrdiff_t ystride = _ystride / sizeof(pixel);



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

        const int tc = _tc[j] << (BIT_DEPTH - 8);

        if (tc <= 0) {

            pix += 4 * ystride;

            continue;

        }

        no_p = _no_p[j];

        no_q = _no_q[j];



        for (d = 0; d < 4; d++) {

            int delta0;

            const int p1 = P1;

            const int p0 = P0;

            const int q0 = Q0;

            const int q1 = Q1;

            delta0 = av_clip((((q0 - p0) << 2) + p1 - q1 + 4) >> 3, -tc, tc);

            if (!no_p)

                P0 = av_clip_pixel(p0 + delta0);

            if (!no_q)

                Q0 = av_clip_pixel(q0 - delta0);

            pix += ystride;

        }

    }

}

static void FUNC_0(hevc_loop_filter_chroma)(uint8_t *_pix, ptrdiff_t _xstride,

                                          ptrdiff_t _ystride, int *_tc,

                                          uint8_t *_no_p, uint8_t *_no_q)

{

    int VAR_0, VAR_1, VAR_2, VAR_3;

    pixel *pix        = (pixel *)_pix;

    ptrdiff_t xstride = _xstride / sizeof(pixel);

    ptrdiff_t ystride = _ystride / sizeof(pixel);



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

        const int VAR_4 = _tc[VAR_1] << (BIT_DEPTH - 8);

        if (VAR_4 <= 0) {

            pix += 4 * ystride;

            continue;

        }

        VAR_2 = _no_p[VAR_1];

        VAR_3 = _no_q[VAR_1];



        for (VAR_0 = 0; VAR_0 < 4; VAR_0++) {

            int VAR_5;

            const int VAR_6 = P1;

            const int VAR_7 = P0;

            const int VAR_8 = Q0;

            const int VAR_9 = Q1;

            VAR_5 = av_clip((((VAR_8 - VAR_7) << 2) + VAR_6 - VAR_9 + 4) >> 3, -VAR_4, VAR_4);

            if (!VAR_2)

                P0 = av_clip_pixel(VAR_7 + VAR_5);

            if (!VAR_3)

                Q0 = av_clip_pixel(VAR_8 - VAR_5);

            pix += ystride;

        }

    }

}

static void FUNC_0(hevc_loop_filter_chroma)(uint8_t *_pix, ptrdiff_t _xstride,
ptrdiff_t _ystride, int *_tc,
uint8_t *_no_p, uint8_t *_no_q)
{ int VAR_0, VAR_1, VAR_2, VAR_3; pixel *pix        = (pixel *)_pix; ptrdiff_t xstride = _xstride / sizeof(pixel); ptrdiff_t ystride = _ystride / sizeof(pixel); for (VAR_1 = 0; VAR_1 < 2; VAR_1++) { const int VAR_4 = _tc[VAR_1] << (BIT_DEPTH - 8); if (VAR_4 <= 0) { pix += 4 * ystride; continue; } VAR_2 = _no_p[VAR_1]; VAR_3 = _no_q[VAR_1]; for (VAR_0 = 0; VAR_0 < 4; VAR_0++) { int VAR_5; const int VAR_6 = P1; const int VAR_7 = P0; const int VAR_8 = Q0; const int VAR_9 = Q1; VAR_5 = av_clip((((VAR_8 - VAR_7) << 2) + VAR_6 - VAR_9 + 4) >> 3, -VAR_4, VAR_4); if (!VAR_2)
P0 = av_clip_pixel(VAR_7 + VAR_5); if (!VAR_3)
Q0 = av_clip_pixel(VAR_8 - VAR_5); pix += ystride; } } }