rename lanczos to lohalo
GEGL had a broken lanczos implementation, the lohalo implementation is better anyways (at least when passed a proper scale matrix).
This commit is contained in:

committed by
Michael Natterer

parent
52e40bce42
commit
76546f7e7c
@ -266,7 +266,7 @@ gimp_transform_region (GimpPickable *pickable,
|
|||||||
bg_color, progress);
|
bg_color, progress);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_INTERPOLATION_LANCZOS:
|
case GIMP_INTERPOLATION_LOHALO:
|
||||||
gimp_transform_region_lanczos (orig_tiles, destPR,
|
gimp_transform_region_lanczos (orig_tiles, destPR,
|
||||||
dest_x1, dest_y1, dest_x2, dest_y2,
|
dest_x1, dest_y1, dest_x2, dest_y2,
|
||||||
u1, v1, u2, v2,
|
u1, v1, u2, v2,
|
||||||
|
@ -446,7 +446,7 @@ gimp_drawable_scale (GimpItem *item,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (gimp_use_gegl (gimp_item_get_image (item)->gimp) &&
|
if (gimp_use_gegl (gimp_item_get_image (item)->gimp) &&
|
||||||
interpolation_type != GIMP_INTERPOLATION_LANCZOS)
|
interpolation_type != GIMP_INTERPOLATION_LOHALO)
|
||||||
{
|
{
|
||||||
GeglNode *scale;
|
GeglNode *scale;
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ gimp_interpolation_to_gegl_filter (GimpInterpolationType interpolation)
|
|||||||
case GIMP_INTERPOLATION_NONE: return "nearest";
|
case GIMP_INTERPOLATION_NONE: return "nearest";
|
||||||
case GIMP_INTERPOLATION_LINEAR: return "linear";
|
case GIMP_INTERPOLATION_LINEAR: return "linear";
|
||||||
case GIMP_INTERPOLATION_CUBIC: return "cubic";
|
case GIMP_INTERPOLATION_CUBIC: return "cubic";
|
||||||
case GIMP_INTERPOLATION_LANCZOS: return "lohalo";
|
case GIMP_INTERPOLATION_LOHALO: return "lohalo";
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -488,7 +488,7 @@ scale (TileManager *srcTM,
|
|||||||
surround = pixel_surround_new (srcTM, 4, 4, PIXEL_SURROUND_SMEAR);
|
surround = pixel_surround_new (srcTM, 4, 4, PIXEL_SURROUND_SMEAR);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_INTERPOLATION_LANCZOS:
|
case GIMP_INTERPOLATION_LOHALO:
|
||||||
surround = pixel_surround_new (srcTM, 6, 6, PIXEL_SURROUND_SMEAR);
|
surround = pixel_surround_new (srcTM, 6, 6, PIXEL_SURROUND_SMEAR);
|
||||||
kernel_lookup = create_lanczos3_lookup ();
|
kernel_lookup = create_lanczos3_lookup ();
|
||||||
break;
|
break;
|
||||||
@ -537,7 +537,7 @@ scale (TileManager *srcTM,
|
|||||||
sx, sy, xfrac, yfrac, bytes, pixel);
|
sx, sy, xfrac, yfrac, bytes, pixel);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_INTERPOLATION_LANCZOS:
|
case GIMP_INTERPOLATION_LOHALO:
|
||||||
interpolate_lanczos3 (surround,
|
interpolate_lanczos3 (surround,
|
||||||
sx, sy, xfrac, yfrac, bytes, pixel,
|
sx, sy, xfrac, yfrac, bytes, pixel,
|
||||||
kernel_lookup);
|
kernel_lookup);
|
||||||
|
@ -570,7 +570,7 @@ gimp_interpolation_type_get_type (void)
|
|||||||
{ GIMP_INTERPOLATION_NONE, "GIMP_INTERPOLATION_NONE", "none" },
|
{ GIMP_INTERPOLATION_NONE, "GIMP_INTERPOLATION_NONE", "none" },
|
||||||
{ GIMP_INTERPOLATION_LINEAR, "GIMP_INTERPOLATION_LINEAR", "linear" },
|
{ GIMP_INTERPOLATION_LINEAR, "GIMP_INTERPOLATION_LINEAR", "linear" },
|
||||||
{ GIMP_INTERPOLATION_CUBIC, "GIMP_INTERPOLATION_CUBIC", "cubic" },
|
{ GIMP_INTERPOLATION_CUBIC, "GIMP_INTERPOLATION_CUBIC", "cubic" },
|
||||||
{ GIMP_INTERPOLATION_LANCZOS, "GIMP_INTERPOLATION_LANCZOS", "lanczos" },
|
{ GIMP_INTERPOLATION_LOHALO, "GIMP_INTERPOLATION_LOHALO", "lohalo" },
|
||||||
{ 0, NULL, NULL }
|
{ 0, NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -579,7 +579,7 @@ gimp_interpolation_type_get_type (void)
|
|||||||
{ GIMP_INTERPOLATION_NONE, NC_("interpolation-type", "None"), NULL },
|
{ GIMP_INTERPOLATION_NONE, NC_("interpolation-type", "None"), NULL },
|
||||||
{ GIMP_INTERPOLATION_LINEAR, NC_("interpolation-type", "Linear"), NULL },
|
{ GIMP_INTERPOLATION_LINEAR, NC_("interpolation-type", "Linear"), NULL },
|
||||||
{ GIMP_INTERPOLATION_CUBIC, NC_("interpolation-type", "Cubic"), NULL },
|
{ GIMP_INTERPOLATION_CUBIC, NC_("interpolation-type", "Cubic"), NULL },
|
||||||
{ GIMP_INTERPOLATION_LANCZOS, NC_("interpolation-type", "Sinc (Lanczos3)"), NULL },
|
{ GIMP_INTERPOLATION_LOHALO, NC_("interpolation-type", "LoHalo"), NULL },
|
||||||
{ 0, NULL, NULL }
|
{ 0, NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -253,10 +253,11 @@ GType gimp_interpolation_type_get_type (void) G_GNUC_CONST;
|
|||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
GIMP_INTERPOLATION_NONE, /*< desc="None" >*/
|
GIMP_INTERPOLATION_NONE, /*< desc="None" >*/
|
||||||
GIMP_INTERPOLATION_LINEAR, /*< desc="Linear" >*/
|
GIMP_INTERPOLATION_LINEAR, /*< desc="Linear" >*/
|
||||||
GIMP_INTERPOLATION_CUBIC, /*< desc="Cubic" >*/
|
GIMP_INTERPOLATION_CUBIC, /*< desc="Cubic" >*/
|
||||||
GIMP_INTERPOLATION_LANCZOS /*< desc="Sinc (Lanczos3)" >*/
|
GIMP_INTERPOLATION_LOHALO, /*< desc="LoHalo" >*/
|
||||||
|
GIMP_INTERPOLATION_LANCZOS = GIMP_INTERPOLATION_LOHALO /*< skip */
|
||||||
} GimpInterpolationType;
|
} GimpInterpolationType;
|
||||||
|
|
||||||
|
|
||||||
|
@ -176,12 +176,11 @@ package Gimp::CodeGen::enums;
|
|||||||
{ contig => 1,
|
{ contig => 1,
|
||||||
header => 'libgimpbase/gimpbaseenums.h',
|
header => 'libgimpbase/gimpbaseenums.h',
|
||||||
symbols => [ qw(GIMP_INTERPOLATION_NONE GIMP_INTERPOLATION_LINEAR
|
symbols => [ qw(GIMP_INTERPOLATION_NONE GIMP_INTERPOLATION_LINEAR
|
||||||
GIMP_INTERPOLATION_CUBIC
|
GIMP_INTERPOLATION_CUBIC GIMP_INTERPOLATION_LOHALO) ],
|
||||||
GIMP_INTERPOLATION_LANCZOS) ],
|
|
||||||
mapping => { GIMP_INTERPOLATION_NONE => '0',
|
mapping => { GIMP_INTERPOLATION_NONE => '0',
|
||||||
GIMP_INTERPOLATION_LINEAR => '1',
|
GIMP_INTERPOLATION_LINEAR => '1',
|
||||||
GIMP_INTERPOLATION_CUBIC => '2',
|
GIMP_INTERPOLATION_CUBIC => '2',
|
||||||
GIMP_INTERPOLATION_LANCZOS => '3' }
|
GIMP_INTERPOLATION_LOHALO => '3' }
|
||||||
},
|
},
|
||||||
GimpPaintApplicationMode =>
|
GimpPaintApplicationMode =>
|
||||||
{ contig => 1,
|
{ contig => 1,
|
||||||
|
Reference in New Issue
Block a user