Exemplo n.º 1
0
static void spatial_compose_dd137i_dy(DWTContext *d, int level, int width, int height, int stride)
{
    vertical_compose_5tap vertical_compose_l0 = (void*)d->vertical_compose_l0;
    vertical_compose_5tap vertical_compose_h0 = (void*)d->vertical_compose_h0;
    DWTCompose *cs = d->cs + level;

    int i, y = cs->y;
    IDWTELEM *b[10];
    for (i = 0; i < 8; i++)
        b[i] = cs->b[i];
    b[8] = d->buffer + av_clip(y+7, 0, height-2)*stride;
    b[9] = d->buffer + av_clip(y+8, 1, height-1)*stride;

        if(y+5<(unsigned)height) vertical_compose_l0(b[3], b[5], b[6], b[7], b[9], width);
        if(y+1<(unsigned)height) vertical_compose_h0(b[0], b[2], b[3], b[4], b[6], width);

        if(y-1<(unsigned)height) d->horizontal_compose(b[0], d->temp, width);
        if(y+0<(unsigned)height) d->horizontal_compose(b[1], d->temp, width);

    for (i = 0; i < 8; i++)
        cs->b[i] = b[i+2];
    cs->y += 2;
}
Exemplo n.º 2
0
// Don't do sliced idwt for fidelity; the 9 tap filter makes it a bit annoying
// Fortunately, this filter isn't used in practice.
static void RENAME(spatial_compose_fidelity)(DWTContext *d, int level, int width, int height, int stride)
{
    vertical_compose_9tap vertical_compose_l0 = (void*)d->vertical_compose_l0;
    vertical_compose_9tap vertical_compose_h0 = (void*)d->vertical_compose_h0;
    int i, y;
    uint8_t *b[8];

    for (y = 1; y < height; y += 2) {
        for (i = 0; i < 8; i++)
            b[i] = d->buffer + av_clip((y-7 + 2*i), 0, height-2)*stride;
        vertical_compose_h0(d->buffer + y*stride, b, width);
    }

    for (y = 0; y < height; y += 2) {
        for (i = 0; i < 8; i++)
            b[i] = d->buffer + av_clip((y-7 + 2*i), 1, height-1)*stride;
        vertical_compose_l0(d->buffer + y*stride, b, width);
    }

    for (y = 0; y < height; y++)
        d->horizontal_compose(d->buffer + y*stride, d->temp, width);

    d->cs[level].y = height+1;
}