]>
git.sesse.net Git - nageru/log
Steinar H. Gunderson [Sat, 4 Aug 2018 20:37:41 +0000 (22:37 +0200)]
Add a warmup option to get somewhat more consistent timings.
Steinar H. Gunderson [Sat, 4 Aug 2018 20:35:43 +0000 (22:35 +0200)]
Fix a bug where the first black pass of SOR would read junk data.
Steinar H. Gunderson [Sat, 4 Aug 2018 19:31:15 +0000 (21:31 +0200)]
Rename du_dv_tex to diff_flow_tex, for consistency.
Steinar H. Gunderson [Sat, 4 Aug 2018 19:20:26 +0000 (21:20 +0200)]
Update the SOR comment about twinned buffering.
Steinar H. Gunderson [Sat, 4 Aug 2018 13:33:29 +0000 (15:33 +0200)]
Fix an outdated comment.
Steinar H. Gunderson [Sat, 4 Aug 2018 12:43:22 +0000 (14:43 +0200)]
Microoptimization in the SOR fragment shader.
Steinar H. Gunderson [Sat, 4 Aug 2018 12:24:11 +0000 (14:24 +0200)]
Split the equation texture in two, which speeds up SOR by ~30%.
Steinar H. Gunderson [Fri, 3 Aug 2018 19:02:34 +0000 (21:02 +0200)]
Fix a NaN issue on Intel.
Steinar H. Gunderson [Fri, 3 Aug 2018 18:53:36 +0000 (20:53 +0200)]
Pack the gradients and image together into a single 32-bit texture; seems to help ~1.5 ms for flow on NVIDIA.
Steinar H. Gunderson [Fri, 3 Aug 2018 16:07:07 +0000 (18:07 +0200)]
Remove some redundant glUseProgram() calls.
Steinar H. Gunderson [Thu, 2 Aug 2018 22:19:55 +0000 (00:19 +0200)]
Remove an unused uniform.
Steinar H. Gunderson [Thu, 2 Aug 2018 22:09:20 +0000 (00:09 +0200)]
Properly release the flow texture; saves 1 ms (!) on FBO creation.
Steinar H. Gunderson [Thu, 2 Aug 2018 18:17:30 +0000 (20:17 +0200)]
Compute diffusivity instead of smoothness, which saves a flow-size texture; shaves about 0.2 ms off 720p flow on GTX 950.
Steinar H. Gunderson [Thu, 2 Aug 2018 17:31:38 +0000 (19:31 +0200)]
Remove some dead code.
Steinar H. Gunderson [Thu, 2 Aug 2018 17:31:23 +0000 (19:31 +0200)]
Microoptimization in splat.vert.
Steinar H. Gunderson [Thu, 2 Aug 2018 15:35:17 +0000 (17:35 +0200)]
Share VAOs between all the passes. Much less code, less rebinding overhead.
Steinar H. Gunderson [Thu, 2 Aug 2018 15:59:58 +0000 (17:59 +0200)]
Fix an issue where we would lose >1 ms for computing flow on NVIDIA, due to lack of fast clears.
Steinar H. Gunderson [Thu, 2 Aug 2018 15:56:58 +0000 (17:56 +0200)]
Make PersistentFBOSet handle depth.
Steinar H. Gunderson [Thu, 2 Aug 2018 15:49:49 +0000 (17:49 +0200)]
Remove the rather pointless enable_if tests for now. And move to C++14.
Steinar H. Gunderson [Thu, 2 Aug 2018 15:20:32 +0000 (17:20 +0200)]
Fix a GLSL syntax error that tripped up NVIDIA.
Steinar H. Gunderson [Thu, 2 Aug 2018 15:20:24 +0000 (17:20 +0200)]
Disable dither; we don't need it.
Steinar H. Gunderson [Thu, 2 Aug 2018 15:20:02 +0000 (17:20 +0200)]
When timing a level, print the resolution.
Steinar H. Gunderson [Thu, 2 Aug 2018 15:19:49 +0000 (17:19 +0200)]
Make a new flag --detailed-timing for microsecond measurements and more.
Steinar H. Gunderson [Thu, 2 Aug 2018 15:14:28 +0000 (17:14 +0200)]
Move GPUTimers into its own file.
Steinar H. Gunderson [Wed, 1 Aug 2018 23:15:30 +0000 (01:15 +0200)]
Remove an unused uniform.
Steinar H. Gunderson [Tue, 31 Jul 2018 23:09:43 +0000 (01:09 +0200)]
Use the same PBO readback system for interpolated images as flows.
Steinar H. Gunderson [Tue, 31 Jul 2018 15:06:19 +0000 (17:06 +0200)]
Speed up hole filling by ~10%.
Steinar H. Gunderson [Mon, 30 Jul 2018 23:10:15 +0000 (01:10 +0200)]
Implement hole filling.
Steinar H. Gunderson [Mon, 30 Jul 2018 21:18:43 +0000 (23:18 +0200)]
Put depth in 0..1; evidently even fp32 depth is clamped in the ARB version.
Steinar H. Gunderson [Mon, 30 Jul 2018 16:08:23 +0000 (18:08 +0200)]
Start working on interpolation code.
Steinar H. Gunderson [Sat, 28 Jul 2018 18:53:46 +0000 (20:53 +0200)]
Do RGB -> grayscale conversion on the GPU.
Steinar H. Gunderson [Sat, 28 Jul 2018 14:43:51 +0000 (16:43 +0200)]
Split texture pooling out from DISComputeFlow into its own class.
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.