Commit 58ded09b authored by Timothy Gu's avatar Timothy Gu

dirac_dwt: Rename init2 to init

The functions are all private.
parent 6cdde20b
...@@ -33,9 +33,9 @@ ...@@ -33,9 +33,9 @@
#define TEMPLATE_12bit #define TEMPLATE_12bit
#include "dirac_dwt_template.c" #include "dirac_dwt_template.c"
int ff_spatial_idwt_init2(DWTContext *d, uint8_t *buffer, int width, int height, int ff_spatial_idwt_init(DWTContext *d, uint8_t *buffer, int width, int height,
int stride, enum dwt_type type, int decomposition_count, int stride, enum dwt_type type, int decomposition_count,
uint8_t *temp, int bit_depth) uint8_t *temp, int bit_depth)
{ {
int ret = 0; int ret = 0;
...@@ -47,11 +47,11 @@ int ff_spatial_idwt_init2(DWTContext *d, uint8_t *buffer, int width, int height, ...@@ -47,11 +47,11 @@ int ff_spatial_idwt_init2(DWTContext *d, uint8_t *buffer, int width, int height,
d->temp = temp; d->temp = temp;
if (bit_depth == 8) 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) 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) else if (bit_depth == 12)
ret = ff_spatial_idwt_init2_12bit(d, type); ret = ff_spatial_idwt_init_12bit(d, type);
else else
av_log(NULL, AV_LOG_WARNING, "Unsupported bit depth = %i\n", bit_depth); av_log(NULL, AV_LOG_WARNING, "Unsupported bit depth = %i\n", bit_depth);
......
...@@ -76,9 +76,9 @@ enum dwt_type { ...@@ -76,9 +76,9 @@ enum dwt_type {
}; };
// -1 if an error occurred, e.g. the dwt_type isn't recognized // -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 ff_spatial_idwt_init(DWTContext *d, uint8_t *buffer, int width, int height,
int stride, enum dwt_type type, int decomposition_count, int stride, enum dwt_type type, int decomposition_count,
uint8_t *temp, int bit_depth); uint8_t *temp, int bit_depth);
void ff_spatial_idwt_init_x86(DWTContext *d, enum dwt_type type); void ff_spatial_idwt_init_x86(DWTContext *d, enum dwt_type type);
void ff_spatial_idwt_slice2(DWTContext *d, int y); void ff_spatial_idwt_slice2(DWTContext *d, int y);
......
...@@ -476,7 +476,7 @@ static void RENAME(spatial_compose_daub97i_dy)(DWTContext *d, int level, int wid ...@@ -476,7 +476,7 @@ static void RENAME(spatial_compose_daub97i_dy)(DWTContext *d, int level, int wid
cs->y += 2; 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[0] = buffer + avpriv_mirror(-3-1, height-1)*stride;
cs->b[1] = buffer + avpriv_mirror(-3 , 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 ...@@ -485,7 +485,7 @@ static void RENAME(spatial_compose97i_init2)(DWTCompose *cs, uint8_t *buffer, in
cs->y = -3; 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[0] = buffer + avpriv_mirror(-1-1, height-1)*stride;
cs->b[1] = buffer + avpriv_mirror(-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, ...@@ -516,7 +516,7 @@ static void RENAME(spatial_compose_dd137i_init)(DWTCompose *cs, uint8_t *buffer,
cs->y = -5; 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; int level;
...@@ -531,7 +531,7 @@ static int RENAME(ff_spatial_idwt_init2)(DWTContext *d, enum dwt_type type) ...@@ -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); RENAME(spatial_compose_dd97i_init)(d->cs+level, d->buffer, hl, stride_l);
break; break;
case DWT_DIRAC_LEGALL5_3: 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; break;
case DWT_DIRAC_DD13_7: case DWT_DIRAC_DD13_7:
RENAME(spatial_compose_dd137i_init)(d->cs+level, d->buffer, hl, stride_l); 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) ...@@ -541,7 +541,7 @@ static int RENAME(ff_spatial_idwt_init2)(DWTContext *d, enum dwt_type type)
d->cs[level].y = 1; d->cs[level].y = 1;
break; break;
case DWT_DIRAC_DAUB9_7: 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; break;
default: default:
d->cs[level].y = 0; d->cs[level].y = 0;
......
...@@ -1755,8 +1755,8 @@ static int dirac_decode_frame_internal(DiracContext *s) ...@@ -1755,8 +1755,8 @@ static int dirac_decode_frame_internal(DiracContext *s)
memset(p->idwt_buf, 0, p->idwt_stride * p->idwt_height); memset(p->idwt_buf, 0, p->idwt_stride * p->idwt_height);
decode_component(s, comp); /* [DIRAC_STD] 13.4.1 core_transform_data() */ 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, 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); s->wavelet_idx+2, s->wavelet_depth, p->idwt_tmp, s->bit_depth);
if (ret < 0) if (ret < 0)
return ret; return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment