Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.88k stars 323 forks source link

Preview sometimes doesn't update, demozaicing occure too often #1441

Closed Beep6581 closed 9 years ago

Beep6581 commented 9 years ago

Originally reported on Google Code with ID 1457

How to reproduce:
1. Open a new file
2. Apply the "Neutral" profile
3. Move your pointer to the center of the preview and scroll up to 100% scale: it doesn't
update when switching from 50% to 100%
   Note: The Amaze demozaicing occurs
4. single click in the center of the preview: the preview does correctly update
5. switch back to the 50% zoom
6. enable the denoise tool
7. zoom to 100%: the Amaze demozaicing occurs again! It shouldn't since the denoise
tool doesn't imply the demozaicing.

Strangely, if you move the image to one of its corner, then place the mouse near that
corner, using the scroll mouse to switch from 50% to 100% back and forth does work!

Here is a patch to solve all this. It include a quick and dirty bugfix in dcrop.cc:
i hope that there's no bad impact on performance, maybe someone connected to the nature's
forces could ask genies how this obscure pipeline work and make a cleaner patch?

Reported by natureh.510 on 2012-07-01 22:58:16


Beep6581 commented 9 years ago
Hi Hombre, one more thing to test is to verify that re-demosaic occurs depending on
how HL reconstruction is changed - relevant to Color propagation (issue 1025)

Reported by michaelezra000 on 2012-07-02 00:12:24

Beep6581 commented 9 years ago
I confirm everything in Linux 64.
Great that you discovered that the position of the preview plays a role, because I
experienced this bug for a long time but didn't file a report as I couldn't reliably
reproduce - the corner thing was the reason!

The patch seems to work great! It also prevents re-demosaicing when going back and
forth in history.

Reported by entertheyoni on 2012-07-02 00:31:17

Beep6581 commented 9 years ago
> maybe someone connected to the nature's forces could ask genies how this obscure 
> pipeline work and make a cleaner patch
The trick with the pipeline is that the "todo" holds a bit flag of what must be done.
Mention in Crop::update that the inbetween memory images are not delete, but kept in
memory. So if the user moves e.g. the lab curve points, the todo should contains a
bit flag that just excutes the processing steps coming afterwards, so saving processing
time with the cached images.
What you seem to do with the patch is to disable that and do a full update all of the
time.

So I'd suggest to either fix the bug really by checking where the necessary bit flag
is not so, or otherwise remodel the update to always full process. But then you could
remove the whole todo bitflag and espc. all the memory allocated.

Reported by oduis@hotmail.com on 2012-07-02 06:06:33

Beep6581 commented 9 years ago
This should be way better.

Reported by natureh.510 on 2012-07-03 03:15:04


Beep6581 commented 9 years ago
Seems to be working perfectly!

Reported by michaelezra000 on 2012-07-03 03:46:38

Beep6581 commented 9 years ago
This is SOOOOOOOO nice, I am no longer afraid to hit the 100% zoom repeatedly! Thanks,
Hombre!

Reported by michaelezra000 on 2012-07-03 04:00:51

Beep6581 commented 9 years ago
And leaves the cache enabled, great!

Reported by oduis@hotmail.com on 2012-07-03 04:53:56

Beep6581 commented 9 years ago
Patch commited then, issue closed :)

Reported by natureh.510 on 2012-07-03 08:45:39

Beep6581 commented 9 years ago
After a bit more testing I see the remaining problem that a 100% preview is not always
updated, it requires a) click on the preview or b) zoom to >100% and then zoom back
to 100%. 
Should this be handled in a separate issue?

Reported by michaelezra000 on 2012-07-03 13:16:50

Beep6581 commented 9 years ago
Could you say how to reproduce?

Reported by natureh.510 on 2012-07-03 15:33:15

Beep6581 commented 9 years ago
Enable USM sharpening, high amount so it would be easy to see
zoom to 100,
see sharpening
zoom to 50
zoom to 100 again - cannot see USM effect

Reported by michaelezra000 on 2012-07-03 15:41:32

Beep6581 commented 9 years ago
to complete your sequence:
- disable the USM tool completly,
- enable it again

You can see that it display an USM effect when you switch from 50% to 100%, but not
with the last values you've set.

Could you revert previously to my patch and make the same test, but by looking at the
corner as explained in comment #1? I'm not sure that this bug is related to my patch.

Reported by natureh.510 on 2012-07-03 16:44:22

Beep6581 commented 9 years ago
Hombre, no I don't think it is related I was able to reproduce in the version just prior
the patch.

Reported by michaelezra000 on 2012-07-03 18:52:11

Beep6581 commented 9 years ago
I confirm this issue in the denoise branch, as described in comment 11:
1- Apply neutral, open photo
2- Enable USM, radius and amount at maximum
3- Zoom to 100%: http://i.imgur.com/MrO7g.jpg
4- Zoom to 50%
5- Zoom to 100%: http://i.imgur.com/8FZLD.jpg

Reported by entertheyoni on 2012-07-07 19:59:36

Beep6581 commented 9 years ago
After the recent merge, DENOISE branch should have relevant code equivalent to the DEFAULT

Reported by michaelezra000 on 2012-07-07 21:29:18

Beep6581 commented 9 years ago

Reported by natureh.510 on 2012-11-02 01:09:07