static void hScale16To19_c(SwsContext *c, int16_t *_dst, int dstW, const uint8_t *_src,

                           const int16_t *filter,

                           const int16_t *filterPos, int filterSize)

{

    int i;

    int32_t *dst = (int32_t *) _dst;

    const uint16_t *src = (const uint16_t *) _src;

    int bits = av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1;

    int sh = bits - 4;



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

        int j;

        int srcPos = filterPos[i];

        int val = 0;



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

            val += src[srcPos + j] * filter[filterSize * i + j];

        }

        // filter=14 bit, input=16 bit, output=30 bit, >> 11 makes 19 bit

        dst[i] = FFMIN(val >> sh, (1 << 19) - 1);

    }

}

static void hScale16To19_c(SwsContext *c, int16_t *_dst, int dstW, const uint8_t *_src,

                           const int16_t *filter,

                           const int16_t *filterPos, int filterSize)

{

    int i;

    int32_t *dst = (int32_t *) _dst;

    const uint16_t *src = (const uint16_t *) _src;

    int bits = av_pix_fmt_descriptors[c->srcFormat].comp[0].depth_minus1;

    int sh = bits - 4;



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

        int j;

        int srcPos = filterPos[i];

        int val = 0;



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

            val += src[srcPos + j] * filter[filterSize * i + j];

        }

        

        dst[i] = FFMIN(val >> sh, (1 << 19) - 1);

    }

}

                           const int16_t *filterPos, int filterSize)                            const int16_t *filterPos, int filterSize)
static void FUNC_0(SwsContext *VAR_0, int16_t *VAR_1, int VAR_2, const uint8_t *VAR_3,

                           const int16_t *VAR_4,

                           const int16_t *VAR_5, int VAR_6)

{

    int VAR_7;

    int32_t *dst = (int32_t *) VAR_1;

    const uint16_t *VAR_8 = (const uint16_t *) VAR_3;

    int VAR_9 = av_pix_fmt_descriptors[VAR_0->srcFormat].comp[0].depth_minus1;

    int VAR_10 = VAR_9 - 4;



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

        int VAR_11;

        int VAR_12 = VAR_5[VAR_7];

        int VAR_13 = 0;



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

            VAR_13 += VAR_8[VAR_12 + VAR_11] * VAR_4[VAR_6 * VAR_7 + VAR_11];

        }

        

        dst[VAR_7] = FFMIN(VAR_13 >> VAR_10, (1 << 19) - 1);

    }

}

static void FUNC_0(SwsContext *VAR_0, int16_t *VAR_1, int VAR_2, const uint8_t *VAR_3,
const int16_t *VAR_4,
const int16_t *VAR_5, int VAR_6)
{ int VAR_7; int32_t *dst = (int32_t *) VAR_1; const uint16_t *VAR_8 = (const uint16_t *) VAR_3; int VAR_9 = av_pix_fmt_descriptors[VAR_0->srcFormat].comp[0].depth_minus1; int VAR_10 = VAR_9 - 4; for (VAR_7 = 0; VAR_7 < VAR_2; VAR_7++) { int VAR_11; int VAR_12 = VAR_5[VAR_7]; int VAR_13 = 0; for (VAR_11 = 0; VAR_11 < VAR_6; VAR_11++) { VAR_13 += VAR_8[VAR_12 + VAR_11] * VAR_4[VAR_6 * VAR_7 + VAR_11]; } dst[VAR_7] = FFMIN(VAR_13 >> VAR_10, (1 << 19) - 1); } }