]>
git.sesse.net Git - nageru/log
Steinar H. Gunderson [Sat, 28 Jul 2018 14:37:43 +0000 (16:37 +0200)]
Hide the OpenGL window; it is rather annoying.
Steinar H. Gunderson [Sat, 28 Jul 2018 14:01:18 +0000 (16:01 +0200)]
Remove a TODO.
Making the penalizer smaller (as one should if adjusting it towards
a smaller range, as there's effectively I² numerator and I denominator)
does not seem to have much effect; actually, increasing it to 0.01
seems to give better results on alley-2, but that's the “wrong way”.
Steinar H. Gunderson [Sat, 28 Jul 2018 13:56:16 +0000 (15:56 +0200)]
Stop leaking texture views (and by extension, textures).
Steinar H. Gunderson [Fri, 27 Jul 2018 14:10:23 +0000 (16:10 +0200)]
Small code cleanup.
Steinar H. Gunderson [Fri, 27 Jul 2018 14:07:47 +0000 (16:07 +0200)]
Use textureSize() instead of sending in uniforms manually. Same result, less code, less error-prone.
Steinar H. Gunderson [Fri, 27 Jul 2018 08:52:40 +0000 (10:52 +0200)]
Remove a TODO; setting up equations is not where our time goes.
Steinar H. Gunderson [Thu, 26 Jul 2018 23:30:27 +0000 (01:30 +0200)]
Halve the number of motion search iterations, to eight.
The DIS code claims this is allowed after they changed their Sobel code;
for us, seemingly SOR was the breaking point. EPE is hardly moving
(<1% for most Sintel tests I've run), but speed goes up markedly.
Steinar H. Gunderson [Thu, 26 Jul 2018 22:21:01 +0000 (00:21 +0200)]
Finally get SOR working.
The trick here was something I'd considered for a long time,
namely red-black SOR so that we update only half the values
every iteration. The implementation is annoyingly inefficient,
but convergence is so much better that it's worth it (a few
percent EPE improvement).
Steinar H. Gunderson [Thu, 26 Jul 2018 21:29:28 +0000 (23:29 +0200)]
Fix a mixup in the variational refinement text.
Steinar H. Gunderson [Thu, 26 Jul 2018 10:45:50 +0000 (12:45 +0200)]
Close off a TODO.
Steinar H. Gunderson [Thu, 26 Jul 2018 10:19:15 +0000 (12:19 +0200)]
Rework patch placement. Finally inches our EPE just below the reference code, it seems.
Steinar H. Gunderson [Wed, 25 Jul 2018 23:43:30 +0000 (01:43 +0200)]
Tweak the default variational refinement weights (optimized on alley_2).
Steinar H. Gunderson [Wed, 25 Jul 2018 23:39:47 +0000 (01:39 +0200)]
Give the variational refinement terms slightly less mysterious names.
Steinar H. Gunderson [Wed, 25 Jul 2018 23:35:21 +0000 (01:35 +0200)]
Fix a done TODO (gamma is for E_G, not E_S, and we multiply in the alpha in the smoothness).
Steinar H. Gunderson [Wed, 25 Jul 2018 23:23:54 +0000 (01:23 +0200)]
Sample gradient as zero outside the image, instead of repeating them. Helps dramatically on edge patches. 20% EPE improvement on alley_2.
Steinar H. Gunderson [Wed, 25 Jul 2018 13:32:56 +0000 (15:32 +0200)]
Small syntactic tweak.
Steinar H. Gunderson [Tue, 24 Jul 2018 21:37:16 +0000 (23:37 +0200)]
Fix the patch out-of-bounds check in motion search (it was all broken).
Steinar H. Gunderson [Tue, 24 Jul 2018 20:56:11 +0000 (22:56 +0200)]
Fix a problem with visualizing flow that goes exactly left.
Steinar H. Gunderson [Tue, 24 Jul 2018 10:56:53 +0000 (12:56 +0200)]
Use asynchronous readback when doing many flows. Speeds up 50-frame jobs by about 30%; PNG reading is now the dominant cost (60% or so).
Steinar H. Gunderson [Mon, 23 Jul 2018 23:29:02 +0000 (01:29 +0200)]
Fix some uniforms not getting through to the motion search vertex shader.
Steinar H. Gunderson [Mon, 23 Jul 2018 23:22:25 +0000 (01:22 +0200)]
Add a debugging flag to disable/ignore variational refinement.
Steinar H. Gunderson [Mon, 23 Jul 2018 18:16:29 +0000 (20:16 +0200)]
Change the discard condition for motion search.
Steinar H. Gunderson [Mon, 23 Jul 2018 16:35:32 +0000 (18:35 +0200)]
Fix a typo.
Steinar H. Gunderson [Mon, 23 Jul 2018 16:31:41 +0000 (18:31 +0200)]
Make motion search happen mostly in pixels; a bit less code that way.
Steinar H. Gunderson [Mon, 23 Jul 2018 13:52:49 +0000 (15:52 +0200)]
Print EPE on stdout, since it is not an error.
Steinar H. Gunderson [Mon, 23 Jul 2018 11:13:15 +0000 (13:13 +0200)]
Make flow writing a bit faster.
Steinar H. Gunderson [Mon, 23 Jul 2018 11:13:02 +0000 (13:13 +0200)]
Print out the first flow pair, too.
Steinar H. Gunderson [Mon, 23 Jul 2018 11:12:13 +0000 (13:12 +0200)]
Add a --disable-timing flag (less spew, less GPU waiting).
Steinar H. Gunderson [Mon, 23 Jul 2018 11:00:05 +0000 (13:00 +0200)]
Add support for computing many flows sequentially (reduces startup overhead).
Steinar H. Gunderson [Mon, 23 Jul 2018 10:42:45 +0000 (12:42 +0200)]
Refactor the flow writing.
Steinar H. Gunderson [Mon, 23 Jul 2018 10:33:22 +0000 (12:33 +0200)]
Reuse textures between flow invocations.
Steinar H. Gunderson [Mon, 23 Jul 2018 10:17:57 +0000 (12:17 +0200)]
Make a wrapper class for all the flow logic.
Steinar H. Gunderson [Mon, 23 Jul 2018 09:42:21 +0000 (11:42 +0200)]
Refactor FBO creation. A step on the way to persistent FBOs and temporary textures.
Steinar H. Gunderson [Mon, 23 Jul 2018 08:56:30 +0000 (10:56 +0200)]
Small cleanup.
Steinar H. Gunderson [Sun, 22 Jul 2018 21:52:37 +0000 (23:52 +0200)]
Make the eval tool capable of taking the average over a series of flow files.
Steinar H. Gunderson [Sun, 22 Jul 2018 13:33:28 +0000 (15:33 +0200)]
Make it possible to set alpha/delta/gamma on the command line, for grid searches.
Steinar H. Gunderson [Sun, 22 Jul 2018 13:16:43 +0000 (15:16 +0200)]
Add in the relative weighting of the variational refinement terms.
Steinar H. Gunderson [Sun, 22 Jul 2018 13:14:38 +0000 (15:14 +0200)]
Fix a comment.
Steinar H. Gunderson [Sat, 21 Jul 2018 22:43:35 +0000 (00:43 +0200)]
Add another missing clear.
Steinar H. Gunderson [Sat, 21 Jul 2018 22:32:03 +0000 (00:32 +0200)]
Deal with buggy GPU timers that go backwards.
Steinar H. Gunderson [Sat, 21 Jul 2018 22:30:02 +0000 (00:30 +0200)]
If needed, resize the flow up (bilinearly) to the final size at the end.
Steinar H. Gunderson [Sat, 21 Jul 2018 21:38:43 +0000 (23:38 +0200)]
Hack around a convergence problem in the SOR code, by stopping the over-relaxation and reverting to pure Gauss-Seidel.
Steinar H. Gunderson [Sat, 21 Jul 2018 14:10:29 +0000 (16:10 +0200)]
Fix a typo.
Steinar H. Gunderson [Sat, 21 Jul 2018 14:09:11 +0000 (16:09 +0200)]
Support giving in file names on the command line.
Steinar H. Gunderson [Sat, 21 Jul 2018 14:07:30 +0000 (16:07 +0200)]
Load arbitrary images through SDL_image, instead of requiring raw grayscale ones.
Steinar H. Gunderson [Sat, 21 Jul 2018 08:58:59 +0000 (10:58 +0200)]
Pack the two b values in the equations with shared exponent.
Steinar H. Gunderson [Sat, 21 Jul 2018 08:49:42 +0000 (10:49 +0200)]
Fix an algebra error in the E_I term.
Steinar H. Gunderson [Fri, 20 Jul 2018 23:30:14 +0000 (01:30 +0200)]
Fix some errors in the smoothness term.
Steinar H. Gunderson [Fri, 20 Jul 2018 22:43:26 +0000 (00:43 +0200)]
Small notational tweak.
Steinar H. Gunderson [Fri, 20 Jul 2018 22:03:22 +0000 (00:03 +0200)]
Add some missing clears.
Steinar H. Gunderson [Fri, 20 Jul 2018 19:56:30 +0000 (21:56 +0200)]
Update .gitignore.
Steinar H. Gunderson [Fri, 20 Jul 2018 19:52:41 +0000 (21:52 +0200)]
In the variational refinement, change the flow unit from normalized coordinates to pixels.
Steinar H. Gunderson [Fri, 20 Jul 2018 19:27:32 +0000 (21:27 +0200)]
Add a FIXME on the scissor.
Steinar H. Gunderson [Fri, 20 Jul 2018 10:33:24 +0000 (12:33 +0200)]
Add much more detailed GPU timers.
Steinar H. Gunderson [Fri, 20 Jul 2018 09:39:36 +0000 (11:39 +0200)]
Fix flow output after we did normalization in the add step.
Steinar H. Gunderson [Fri, 20 Jul 2018 09:32:37 +0000 (11:32 +0200)]
Avoid infinities in a uniform.
Steinar H. Gunderson [Fri, 20 Jul 2018 09:19:28 +0000 (11:19 +0200)]
Finish up the variational refinement, conceptually. Of course, it doesn't work yet.
Steinar H. Gunderson [Fri, 20 Jul 2018 08:33:56 +0000 (10:33 +0200)]
Implement SOR.
Steinar H. Gunderson [Thu, 19 Jul 2018 21:17:12 +0000 (23:17 +0200)]
Calculate smoothness and set up the equations. Still fairly buggy (missing 0..1 normalization adjustments, at least).
Steinar H. Gunderson [Thu, 19 Jul 2018 21:16:22 +0000 (23:16 +0200)]
Also calculate beta_0 when calculating derivatives.
Steinar H. Gunderson [Wed, 18 Jul 2018 18:45:33 +0000 (20:45 +0200)]
Fix some indentation.
Steinar H. Gunderson [Wed, 18 Jul 2018 08:51:58 +0000 (10:51 +0200)]
Use textureOffset() wherever possible to save some tedious arithmetic.
Steinar H. Gunderson [Tue, 17 Jul 2018 12:41:55 +0000 (14:41 +0200)]
Calculate I_x and I_y for variational refinement.
Steinar H. Gunderson [Wed, 11 Jul 2018 22:44:17 +0000 (00:44 +0200)]
Start working on variational refinement.
Steinar H. Gunderson [Wed, 11 Jul 2018 22:39:29 +0000 (00:39 +0200)]
Reduce the spam in apitrace a bit.
Steinar H. Gunderson [Sat, 7 Jul 2018 11:41:13 +0000 (13:41 +0200)]
Do patch normalization in densification.
Steinar H. Gunderson [Sat, 7 Jul 2018 10:58:34 +0000 (12:58 +0200)]
In densification, grow the patch a bit. Seemingly helps a lot on the EPE.
Steinar H. Gunderson [Sat, 7 Jul 2018 10:54:00 +0000 (12:54 +0200)]
Correct the sampling of the flow in the densification vertex shader.
Steinar H. Gunderson [Sat, 7 Jul 2018 10:30:35 +0000 (12:30 +0200)]
Remove an unused sampler.
Steinar H. Gunderson [Sat, 7 Jul 2018 09:08:05 +0000 (11:08 +0200)]
Fix the texel centers for motion search. Helps a whole lot.
Steinar H. Gunderson [Fri, 6 Jul 2018 23:10:32 +0000 (01:10 +0200)]
Remove some duplicate vertex attributes.
Steinar H. Gunderson [Fri, 6 Jul 2018 23:04:28 +0000 (01:04 +0200)]
Use fp16 for the densification output texture; evidently does not matter for quality.
Steinar H. Gunderson [Fri, 6 Jul 2018 22:20:00 +0000 (00:20 +0200)]
Remove an unused uniform.
Steinar H. Gunderson [Fri, 6 Jul 2018 22:17:17 +0000 (00:17 +0200)]
Check uniform locations ahead-of-time, for slightly reduced GL overhead.
Steinar H. Gunderson [Fri, 6 Jul 2018 21:41:01 +0000 (23:41 +0200)]
Add some utility functions for working with .flo files.
Steinar H. Gunderson [Fri, 6 Jul 2018 20:22:20 +0000 (22:22 +0200)]
Write a .flo file for easier evaluation.
Steinar H. Gunderson [Thu, 5 Jul 2018 22:45:53 +0000 (00:45 +0200)]
Reject motion search if we go beyond the image boundary; seems to fix most of the bad edge behavior.
Steinar H. Gunderson [Thu, 5 Jul 2018 22:35:57 +0000 (00:35 +0200)]
Show GPU time used.
Steinar H. Gunderson [Thu, 5 Jul 2018 22:22:24 +0000 (00:22 +0200)]
Visualize the flow consistently with .flo files (which have y = down).
Steinar H. Gunderson [Thu, 5 Jul 2018 21:46:05 +0000 (23:46 +0200)]
Fix a sign error in the motion search. (The paper is not entirely clear on this, but I am fairly certain it is right.)
Steinar H. Gunderson [Thu, 5 Jul 2018 21:19:15 +0000 (23:19 +0200)]
Add mean normalization for patches.
Steinar H. Gunderson [Thu, 5 Jul 2018 19:13:29 +0000 (21:13 +0200)]
Fix normalization in the Sobel calculation.
Steinar H. Gunderson [Wed, 4 Jul 2018 20:21:39 +0000 (22:21 +0200)]
Update some comments.
Steinar H. Gunderson [Wed, 4 Jul 2018 18:35:37 +0000 (20:35 +0200)]
Factor out the RGB conversion code into a header file.
Steinar H. Gunderson [Wed, 4 Jul 2018 07:26:55 +0000 (09:26 +0200)]
Make image width/height consistently a vec2.
Steinar H. Gunderson [Tue, 3 Jul 2018 23:00:57 +0000 (01:00 +0200)]
Implement coarse-to-fine. Still too buggy.
Steinar H. Gunderson [Tue, 3 Jul 2018 22:48:40 +0000 (00:48 +0200)]
Some refactoring in flow.cpp.
Steinar H. Gunderson [Tue, 3 Jul 2018 21:52:04 +0000 (23:52 +0200)]
Various fixes to flow visualization. Still broken.
Steinar H. Gunderson [Tue, 3 Jul 2018 21:32:39 +0000 (23:32 +0200)]
Add the densification step, in theory now providing us with flow. But still too buggy, of course.
Steinar H. Gunderson [Mon, 2 Jul 2018 22:03:45 +0000 (00:03 +0200)]
Start implementing motion search.
Steinar H. Gunderson [Mon, 2 Jul 2018 07:34:35 +0000 (09:34 +0200)]
Be slightly more DSA.
Steinar H. Gunderson [Sun, 1 Jul 2018 21:43:16 +0000 (23:43 +0200)]
Add some beginning flow computation code (currently only gradient calculation).
Steinar H. Gunderson [Wed, 20 Jun 2018 21:18:26 +0000 (23:18 +0200)]
Fix so that when editing a field, the previous value is readily available.
Steinar H. Gunderson [Tue, 19 Jun 2018 21:19:23 +0000 (23:19 +0200)]
Make it possible to change the camera angle in the playlist.
Steinar H. Gunderson [Tue, 19 Jun 2018 07:34:33 +0000 (09:34 +0200)]
When scrubbing in the playlist, show the right camera.
Steinar H. Gunderson [Mon, 18 Jun 2018 22:37:31 +0000 (00:37 +0200)]
Add some playlist manipulation controls.
Steinar H. Gunderson [Mon, 18 Jun 2018 19:38:54 +0000 (21:38 +0200)]
Fix a crash.
Steinar H. Gunderson [Sun, 17 Jun 2018 22:41:06 +0000 (00:41 +0200)]
Make it possible to switch camera angles for previews with the 1–4 keys.
Steinar H. Gunderson [Sun, 17 Jun 2018 21:39:23 +0000 (23:39 +0200)]
Move some lambdas out into functions.
Steinar H. Gunderson [Sun, 17 Jun 2018 10:34:30 +0000 (12:34 +0200)]
Implement scrubbing for the playlist.