code cleanup: neareast -> nearest
This commit is contained in:
@@ -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);
|
||||
|
@@ -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++) {
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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 *************************/
|
||||
|
@@ -373,7 +373,7 @@ enum {
|
||||
|
||||
/* MovieTrackingStrabilization->filter */
|
||||
enum {
|
||||
TRACKING_FILTER_NEAREAST = 0,
|
||||
TRACKING_FILTER_NEAREST = 0,
|
||||
TRACKING_FILTER_BILINEAR = 1,
|
||||
TRACKING_FILTER_BICUBIC = 2
|
||||
};
|
||||
|
@@ -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}
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user