code cleanup: neareast -> nearest
authorCampbell Barton <ideasman42@gmail.com>
Tue, 11 Dec 2012 14:19:41 +0000 (14:19 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 11 Dec 2012 14:19:41 +0000 (14:19 +0000)
source/blender/blenkernel/intern/seqeffects.c
source/blender/blenkernel/intern/tracking.c
source/blender/compositor/operations/COM_ImageOperation.cpp
source/blender/compositor/operations/COM_MovieClipOperation.cpp
source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
source/blender/imbuf/IMB_imbuf.h
source/blender/imbuf/intern/imageprocess.c
source/blender/makesdna/DNA_tracking_types.h
source/blender/makesrna/intern/rna_tracking.c
source/blender/nodes/composite/nodes/node_composite_rotate.c
source/blender/nodes/composite/nodes/node_composite_transform.c

index 0b7fdaa7c1d9d1301daa3b1af9b68175b94e914f..3bff209f53cb7ad24a6d6799c40ba892b12a96ab 100644 (file)
@@ -1745,7 +1745,7 @@ static void transform_image(int x, int y, ImBuf *ibuf1, ImBuf *out,  float scale
                        /* interpolate */
                        switch (interpolation) {
                                case 0:
-                                       neareast_interpolation(ibuf1, out, xt, yt, xi, yi);
+                                       nearest_interpolation(ibuf1, out, xt, yt, xi, yi);
                                        break;
                                case 1:
                                        bilinear_interpolation(ibuf1, out, xt, yt, xi, yi);
index 30b484010469b29a7d2eba153a750e9889308cb2..801fecc9f7c1a68bbd0f841055f8117bbc26c4b7 100644 (file)
@@ -3462,15 +3462,15 @@ ImBuf *BKE_tracking_stabilize_frame(MovieTracking *tracking, int framenr, ImBuf
                BKE_tracking_stabilization_data_to_mat4(ibuf->x, ibuf->y, aspect, tloc, tscale, tangle, mat);
                invert_m4(mat);
 
-               if (filter == TRACKING_FILTER_NEAREAST)
-                       interpolation = neareast_interpolation;
+               if (filter == TRACKING_FILTER_NEAREST)
+                       interpolation = nearest_interpolation;
                else if (filter == TRACKING_FILTER_BILINEAR)
                        interpolation = bilinear_interpolation;
                else if (filter == TRACKING_FILTER_BICUBIC)
                        interpolation = bicubic_interpolation;
                else
                        /* fallback to default interpolation method */
-                       interpolation = neareast_interpolation;
+                       interpolation = nearest_interpolation;
 
                for (j = 0; j < tmpibuf->y; j++) {
                        for (i = 0; i < tmpibuf->x; i++) {
index 84557118a1c6278fb43b4fee4c0803a07b0042ad..c8e3dbf993dfe05549f226524e1bb1a3809a6694 100644 (file)
@@ -120,7 +120,7 @@ void ImageOperation::executePixel(float output[4], float x, float y, PixelSample
        else {
                switch (sampler) {
                        case COM_PS_NEAREST:
-                               neareast_interpolation_color(this->m_buffer, NULL, output, x, y);
+                               nearest_interpolation_color(this->m_buffer, NULL, output, x, y);
                                break;
                        case COM_PS_BILINEAR:
                                bilinear_interpolation_color(this->m_buffer, NULL, output, x, y);
@@ -143,7 +143,7 @@ void ImageAlphaOperation::executePixel(float output[4], float x, float y, PixelS
                tempcolor[3] = 1.0f;
                switch (sampler) {
                        case COM_PS_NEAREST:
-                               neareast_interpolation_color(this->m_buffer, NULL, tempcolor, x, y);
+                               nearest_interpolation_color(this->m_buffer, NULL, tempcolor, x, y);
                                break;
                        case COM_PS_BILINEAR:
                                bilinear_interpolation_color(this->m_buffer, NULL, tempcolor, x, y);
index 709e4b7d4b0de9d770da0e48da85f011846cd9a3..74761f00e1fb10ee1db77f454439f06deea889c6 100644 (file)
@@ -95,7 +95,7 @@ void MovieClipOperation::executePixel(float output[4], float x, float y, PixelSa
        else {
                switch (sampler) {
                        case COM_PS_NEAREST:
-                               neareast_interpolation_color(this->m_movieClipBuffer, NULL, output, x, y);
+                               nearest_interpolation_color(this->m_movieClipBuffer, NULL, output, x, y);
                                break;
                        case COM_PS_BILINEAR:
                                bilinear_interpolation_color(this->m_movieClipBuffer, NULL, output, x, y);
index af0d5161835a9f1d7a65ff3ffaf06397e8323e1d..1c9dd0f170ef6b5fdfe19611766ce5387147f7cf 100644 (file)
@@ -54,7 +54,7 @@ void MultilayerColorOperation::executePixel(float output[4], float x, float y, P
                if (this->m_numberOfChannels == 4) {
                        switch (sampler) {
                                case COM_PS_NEAREST:
-                                       neareast_interpolation_color(this->m_buffer, NULL, output, x, y);
+                                       nearest_interpolation_color(this->m_buffer, NULL, output, x, y);
                                        break;
                                case COM_PS_BILINEAR:
                                        bilinear_interpolation_color(this->m_buffer, NULL, output, x, y);
index d0ac71a71319bea21c492119c1f24f9ca58a2142..db1404813b1af151cdfa53e2bd1b2bb0f50872f6 100644 (file)
@@ -407,11 +407,11 @@ void IMB_convert_rgba_to_abgr(struct ImBuf *ibuf);
  * \attention defined in imageprocess.c
  */
 void bicubic_interpolation(struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout);
-void neareast_interpolation(struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout);
+void nearest_interpolation(struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout);
 void bilinear_interpolation(struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout);
 
 void bicubic_interpolation_color(struct ImBuf *in, unsigned char col[4], float col_float[4], float u, float v);
-void neareast_interpolation_color(struct ImBuf *in, unsigned char col[4], float col_float[4], float u, float v);
+void nearest_interpolation_color(struct ImBuf *in, unsigned char col[4], float col_float[4], float u, float v);
 void bilinear_interpolation_color(struct ImBuf *in, unsigned char col[4], float col_float[4], float u, float v);
 void bilinear_interpolation_color_wrap(struct ImBuf *in, unsigned char col[4], float col_float[4], float u, float v);
 
index a185c4ee3e03c15cbcd6bc4d939fad30667d68bc..92b8dd8c724837facba4b51dd2b71fca225124fc 100644 (file)
@@ -219,7 +219,7 @@ void bilinear_interpolation(ImBuf *in, ImBuf *out, float u, float v, int xout, i
 
 /* function assumes out to be zero'ed, only does RGBA */
 /* NEAREST INTERPOLATION */
-void neareast_interpolation_color(struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v)
+void nearest_interpolation_color(struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v)
 {
        float *dataF;
        unsigned char *dataI;
@@ -268,7 +268,7 @@ void neareast_interpolation_color(struct ImBuf *in, unsigned char outI[4], float
        }
 }
 
-void neareast_interpolation(ImBuf *in, ImBuf *out, float x, float y, int xout, int yout)
+void nearest_interpolation(ImBuf *in, ImBuf *out, float x, float y, int xout, int yout)
 {
        unsigned char *outI = NULL;
        float *outF = NULL;
@@ -279,7 +279,7 @@ void neareast_interpolation(ImBuf *in, ImBuf *out, float x, float y, int xout, i
        
        pixel_from_buffer(out, &outI, &outF, xout, yout); /* gcc warns these could be uninitialized, but its ok */
        
-       neareast_interpolation_color(in, outI, outF, x, y);
+       nearest_interpolation_color(in, outI, outF, x, y);
 }
 
 /*********************** Threaded image processing *************************/
index 12819303b26aa95b063dc26c63b0c18f43744fbc..b258fbaa668afa878b6c12d65fa8224f55253c14 100644 (file)
@@ -373,7 +373,7 @@ enum {
 
 /* MovieTrackingStrabilization->filter */
 enum {
-       TRACKING_FILTER_NEAREAST = 0,
+       TRACKING_FILTER_NEAREST  = 0,
        TRACKING_FILTER_BILINEAR = 1,
        TRACKING_FILTER_BICUBIC  = 2
 };
index 4aefaf991d27b4f10761a83e1b0e4f4f5175b016..f5bcab3e530455292fbbf026e20d63b302da51fb 100644 (file)
@@ -1161,7 +1161,7 @@ static void rna_def_trackingStabilization(BlenderRNA *brna)
        PropertyRNA *prop;
 
        static EnumPropertyItem filter_items[] = {
-               {TRACKING_FILTER_NEAREAST, "NEAREST",   0, "Nearest",   ""},
+               {TRACKING_FILTER_NEAREST, "NEAREST",   0, "Nearest",   ""},
                {TRACKING_FILTER_BILINEAR, "BILINEAR",   0, "Bilinear",   ""},
                {TRACKING_FILTER_BICUBIC, "BICUBIC", 0, "Bicubic", ""},
                {0, NULL, 0, NULL, NULL}
index 9a76764b97ea2f75278ab8d1a44975f6fa94589b..50c8b2a78c1e9552cc10fa49e696e497178ce611 100644 (file)
@@ -91,7 +91,7 @@ static void node_composit_exec_rotate(void *UNUSED(data), bNode *node, bNodeStac
 
                                        switch (node->custom1) {
                                        case 0:
-                                               neareast_interpolation(ibuf, obuf, u, v, xo, yo);
+                                               nearest_interpolation(ibuf, obuf, u, v, xo, yo);
                                                break;
                                        case 1:
                                                bilinear_interpolation(ibuf, obuf, u, v, xo, yo);
index a8ef0286f2f8a277b6b4b80c8664371aa73baccc..d6bb545cd5c5bae554fc75735a1c804c75c11878 100644 (file)
@@ -93,7 +93,7 @@ CompBuf* node_composit_transform(CompBuf *cbuf, float x, float y, float angle, f
 
                                switch (filter_type) {
                                        case 0:
-                                               neareast_interpolation(ibuf, obuf, vec[0], vec[1], i, j);
+                                               nearest_interpolation(ibuf, obuf, vec[0], vec[1], i, j);
                                                break;
                                        case 1:
                                                bilinear_interpolation(ibuf, obuf, vec[0], vec[1], i, j);