dirac_dwt: Rename init2 to init

The functions are all private.
This commit is contained in:
Timothy Gu 2016-02-03 01:02:39 +00:00
parent 6cdde20beb
commit 58ded09bd1
4 changed files with 16 additions and 16 deletions

View File

@ -33,9 +33,9 @@
#define TEMPLATE_12bit
#include "dirac_dwt_template.c"
int ff_spatial_idwt_init2(DWTContext *d, uint8_t *buffer, int width, int height,
int stride, enum dwt_type type, int decomposition_count,
uint8_t *temp, int bit_depth)
int ff_spatial_idwt_init(DWTContext *d, uint8_t *buffer, int width, int height,
int stride, enum dwt_type type, int decomposition_count,
uint8_t *temp, int bit_depth)
{
int ret = 0;
@ -47,11 +47,11 @@ int ff_spatial_idwt_init2(DWTContext *d, uint8_t *buffer, int width, int height,
d->temp = temp;
if (bit_depth == 8)
ret = ff_spatial_idwt_init2_8bit(d, type);
ret = ff_spatial_idwt_init_8bit(d, type);
else if (bit_depth == 10)
ret = ff_spatial_idwt_init2_10bit(d, type);
ret = ff_spatial_idwt_init_10bit(d, type);
else if (bit_depth == 12)
ret = ff_spatial_idwt_init2_12bit(d, type);
ret = ff_spatial_idwt_init_12bit(d, type);
else
av_log(NULL, AV_LOG_WARNING, "Unsupported bit depth = %i\n", bit_depth);

View File

@ -76,9 +76,9 @@ enum dwt_type {
};
// -1 if an error occurred, e.g. the dwt_type isn't recognized
int ff_spatial_idwt_init2(DWTContext *d, uint8_t *buffer, int width, int height,
int stride, enum dwt_type type, int decomposition_count,
uint8_t *temp, int bit_depth);
int ff_spatial_idwt_init(DWTContext *d, uint8_t *buffer, int width, int height,
int stride, enum dwt_type type, int decomposition_count,
uint8_t *temp, int bit_depth);
void ff_spatial_idwt_init_x86(DWTContext *d, enum dwt_type type);
void ff_spatial_idwt_slice2(DWTContext *d, int y);

View File

@ -476,7 +476,7 @@ static void RENAME(spatial_compose_daub97i_dy)(DWTContext *d, int level, int wid
cs->y += 2;
}
static void RENAME(spatial_compose97i_init2)(DWTCompose *cs, uint8_t *buffer, int height, int stride)
static void RENAME(spatial_compose97i_init)(DWTCompose *cs, uint8_t *buffer, int height, int stride)
{
cs->b[0] = buffer + avpriv_mirror(-3-1, height-1)*stride;
cs->b[1] = buffer + avpriv_mirror(-3 , height-1)*stride;
@ -485,7 +485,7 @@ static void RENAME(spatial_compose97i_init2)(DWTCompose *cs, uint8_t *buffer, in
cs->y = -3;
}
static void RENAME(spatial_compose53i_init2)(DWTCompose *cs, uint8_t *buffer, int height, int stride)
static void RENAME(spatial_compose53i_init)(DWTCompose *cs, uint8_t *buffer, int height, int stride)
{
cs->b[0] = buffer + avpriv_mirror(-1-1, height-1)*stride;
cs->b[1] = buffer + avpriv_mirror(-1 , height-1)*stride;
@ -516,7 +516,7 @@ static void RENAME(spatial_compose_dd137i_init)(DWTCompose *cs, uint8_t *buffer,
cs->y = -5;
}
static int RENAME(ff_spatial_idwt_init2)(DWTContext *d, enum dwt_type type)
static int RENAME(ff_spatial_idwt_init)(DWTContext *d, enum dwt_type type)
{
int level;
@ -531,7 +531,7 @@ static int RENAME(ff_spatial_idwt_init2)(DWTContext *d, enum dwt_type type)
RENAME(spatial_compose_dd97i_init)(d->cs+level, d->buffer, hl, stride_l);
break;
case DWT_DIRAC_LEGALL5_3:
RENAME(spatial_compose53i_init2)(d->cs+level, d->buffer, hl, stride_l);
RENAME(spatial_compose53i_init)(d->cs+level, d->buffer, hl, stride_l);
break;
case DWT_DIRAC_DD13_7:
RENAME(spatial_compose_dd137i_init)(d->cs+level, d->buffer, hl, stride_l);
@ -541,7 +541,7 @@ static int RENAME(ff_spatial_idwt_init2)(DWTContext *d, enum dwt_type type)
d->cs[level].y = 1;
break;
case DWT_DIRAC_DAUB9_7:
RENAME(spatial_compose97i_init2)(d->cs+level, d->buffer, hl, stride_l);
RENAME(spatial_compose97i_init)(d->cs+level, d->buffer, hl, stride_l);
break;
default:
d->cs[level].y = 0;

View File

@ -1755,8 +1755,8 @@ static int dirac_decode_frame_internal(DiracContext *s)
memset(p->idwt_buf, 0, p->idwt_stride * p->idwt_height);
decode_component(s, comp); /* [DIRAC_STD] 13.4.1 core_transform_data() */
}
ret = ff_spatial_idwt_init2(&d, p->idwt_buf, p->idwt_width, p->idwt_height, p->idwt_stride,
s->wavelet_idx+2, s->wavelet_depth, p->idwt_tmp, s->bit_depth);
ret = ff_spatial_idwt_init(&d, p->idwt_buf, p->idwt_width, p->idwt_height, p->idwt_stride,
s->wavelet_idx+2, s->wavelet_depth, p->idwt_tmp, s->bit_depth);
if (ret < 0)
return ret;