[FFmpeg-devel] [PATCH 2/2] dirac_dwt: Rename init2 to init

Timothy Gu timothygu99 at gmail.com
Sat Feb 6 04:37:51 CET 2016


The functions are all private.
---
 libavcodec/dirac_dwt.c          | 12 ++++++------
 libavcodec/dirac_dwt.h          |  6 +++---
 libavcodec/dirac_dwt_template.c | 10 +++++-----
 libavcodec/diracdec.c           |  4 ++--
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/libavcodec/dirac_dwt.c b/libavcodec/dirac_dwt.c
index 7ccb310..4f04112 100644
--- a/libavcodec/dirac_dwt.c
+++ b/libavcodec/dirac_dwt.c
@@ -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);
 
diff --git a/libavcodec/dirac_dwt.h b/libavcodec/dirac_dwt.h
index b3be596..1a899b3 100644
--- a/libavcodec/dirac_dwt.h
+++ b/libavcodec/dirac_dwt.h
@@ -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);
diff --git a/libavcodec/dirac_dwt_template.c b/libavcodec/dirac_dwt_template.c
index de17a2d..972c711 100644
--- a/libavcodec/dirac_dwt_template.c
+++ b/libavcodec/dirac_dwt_template.c
@@ -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;
diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c
index de7daf3..f3a3bbf 100644
--- a/libavcodec/diracdec.c
+++ b/libavcodec/diracdec.c
@@ -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;
 
-- 
2.1.4



More information about the ffmpeg-devel mailing list