Example #1
0
static void horizontal_compose_dirac53i(IDWTELEM *b, IDWTELEM *temp, int w)
{
    const int w2 = w >> 1;
    int x;

    temp[0] = COMPOSE_53iL0(b[w2], b[0], b[w2]);
    for (x = 1; x < w2; x++) {
        temp[x     ] = COMPOSE_53iL0     (b[x+w2-1], b[x     ], b[x+w2]);
        temp[x+w2-1] = COMPOSE_DIRAC53iH0(temp[x-1], b[x+w2-1], temp[x]);
    }
    temp[w-1] = COMPOSE_DIRAC53iH0(temp[w2-1], b[w-1], temp[w2-1]);

    interleave(b, temp, temp+w2, w2, 1, 1);
}
Example #2
0
static void RENAME(horizontal_compose_dirac53i)(uint8_t *_b, uint8_t *_temp, int w)
{
    int x;
    const int w2 = w >> 1;
    TYPE *b     = (TYPE *)_b;
    TYPE *temp  = (TYPE *)_temp;

    temp[0] = COMPOSE_53iL0(b[w2], b[0], b[w2]);
    for (x = 1; x < w2; x++) {
        temp[x     ] = COMPOSE_53iL0     (b[x+w2-1], b[x     ], b[x+w2]);
        temp[x+w2-1] = COMPOSE_DIRAC53iH0(temp[x-1], b[x+w2-1], temp[x]);
    }
    temp[w-1] = COMPOSE_DIRAC53iH0(temp[w2-1], b[w-1], temp[w2-1]);

    RENAME(interleave)(b, temp, temp+w2, w2, 1, 1);
}
Example #3
0
static void horizontal_compose_dd97i(IDWTELEM *b, IDWTELEM *tmp, int w)
{
    const int w2 = w >> 1;
    int x;

    tmp[0] = COMPOSE_53iL0(b[w2], b[0], b[w2]);
    for (x = 1; x < w2; x++)
        tmp[x] = COMPOSE_53iL0(b[x+w2-1], b[x], b[x+w2]);

    // extend the edges
    tmp[-1]   = tmp[0];
    tmp[w2+1] = tmp[w2] = tmp[w2-1];

    for (x = 0; x < w2; x++) {
        b[2*x  ] = (tmp[x] + 1)>>1;
        b[2*x+1] = (COMPOSE_DD97iH0(tmp[x-1], tmp[x], b[x+w2], tmp[x+1], tmp[x+2]) + 1)>>1;
    }
}
Example #4
0
static void RENAME(horizontal_compose_dd97i)(uint8_t *_b, uint8_t *_tmp, int w)
{
    int x;
    const int w2 = w >> 1;
    TYPE *b   = (TYPE *)_b;
    TYPE *tmp = (TYPE *)_tmp;

    tmp[0] = COMPOSE_53iL0(b[w2], b[0], b[w2]);
    for (x = 1; x < w2; x++)
        tmp[x] = COMPOSE_53iL0(b[x+w2-1], b[x], b[x+w2]);

    // extend the edges
    tmp[-1]   = tmp[0];
    tmp[w2+1] = tmp[w2] = tmp[w2-1];

    for (x = 0; x < w2; x++) {
        b[2*x  ] = (tmp[x] + 1)>>1;
        b[2*x+1] = (COMPOSE_DD97iH0(tmp[x-1], tmp[x], b[x+w2], tmp[x+1], tmp[x+2]) + 1)>>1;
    }
}