Hello Gimp Developers,

Sven Neumann asked me to move this thread from the Users mailinglist, to 
developers. The original discussion can be found here:
http://www.nabble.com/Scaling-in-Gimp-2.6-is-much-slower-than-in-Gimp-2.4-to20185528.html

There is also a Bug in Bugzilla:
http://bugzilla.gnome.org/show_bug.cgi?id=557950

I extended my benchmarks and visual comparisons I've made so far, to give an 
more detailed view on whats the problem.

Short said, it is all about: “Why is 2.6 so slow on scaling, compared to 2.4.” 
;-)
See yourself:


Benchmarking GIMP Scaledown Performance:

Scale layer from 5000x5000px -> 2500x2500px:
(Time for operation WITHOUT image window redraw)

Gimp 2.6:
Interpolation: None:     1,54
Interpolation: Linear:   2,46
Interpolation: Cubic:    5,80
Interpolation: Lanzcos: 15,12

Gimp 2.4:
Interpolation: None:     0,0 (no progressbar noticeable)
Interpolation: Linear:   3,51
Interpolation: Cubic:    3,35
Interpolation: Lanzcos: 22,15


Visual Comparison Gimp Scaledown:

Interpolation None:
Both do show distorted faces. Overall quality is the same. Prefer 2.4 because 
its faster with same quality.

Interpolation Linear:
Alignment of pixels varies (images "jumps" from one 2.4 layer to 2.6 layer, 
borders are aligned). The "distorted faces problem" from above ist still 
present, but "masked" by blur. So the eyes of person 1 has more blur in the 
gimp 2.4 layer, and vice versa. Like above: No version offers overal better 
result, so I prefer the old (faster) version.

Interpolation Cubic:
Alignment of pixels like above. BUT, 2.6 does indeed deliver noticeable better 
results than 2.4 here. Means that BOTH faces are sharper, than in the 2.4 layer.

Interpolation Lanzcos:
Alignment of pixels like above. Visual Quality of 2.4 and 2.6 is the same. 
Prefer 2.4 code, since it is MUCH faster.


Benchmarking GIMP Upscale Performance:

Scale layer from 768x576px -> 1500x1500px:
(Time for operation WITHOUT image window redraw)

Gimp 2.6:
Interpolation: None:     0,50
Interpolation: Linear:   1,21
Interpolation: Cubic:    2,27
Interpolation: Lanzcos:  5,51

Gimp 2.4:
Interpolation: None:     0,0 (no progressbar noticeable)
Interpolation: Linear:   0,60
Interpolation: Cubic:    0,91
Interpolation: Lanzcos:  8,18


Visual Comparison Gimp Upscale:

Interpolation None:
2.4 and 2.6 absolute identical in result (tested with difference blendmode)

Interpolation Linear, Cubic and Lanzcos:
Alignment is different*, beside that, the image is 100% identical
(* the layer has to be moved 1 pixel up and left in 2.4, or down and right in 
2.6 to have the same alignment [200% Scale])

I also have tested with scale factor not being 200%. In that case I cannot use 
the blendmode, since I cannot align the layers right. But visually there was 
also no difference between 2.4 and 2.6.


Conclusion:
Since the difference in processing time shows up even with interpolation 
"None", I think that the origin is not within the interpolation algorithms (or 
at least not only). Instead it seems to me (of course I'm just a user, not a 
developer), that there are some changes in the resize algorithm itself. If I 
understood the stuff in bug #464466 right, the scale routine is used several 
times in the interpolation routine. So, if the resize routine is slow, it 
accumulates in the interpolation routine.

The speed penalty in 2.6 is more than just noticeable, and keeps some users 
away from 2.6.

Also interesting is, the different alignment in 2.4 and 2.6. Why are layers 
that are processed with 2.4 always a bit "left and above" its 2.6 counterpart? 
It isn't really a problem, but if this isn't technical necessary, the behavior 
should be identical, to maintain "project compatibility" between different 
users/gimp versions.

As Sven Neumann already mentioned (see 
http://bugzilla.gnome.org/show_bug.cgi?id=557950), the upscaling could be made 
faster easily.

But I think, that there is room for performance improvements in downscaling 
too...

Sincerely, Claus Berghammer
_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Reply via email to