]> git.sesse.net Git - nageru/log
nageru
5 years agoSplit the equation texture in two, which speeds up SOR by ~30%.
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%.

5 years agoFix a NaN issue on Intel.
Steinar H. Gunderson [Fri, 3 Aug 2018 19:02:34 +0000 (21:02 +0200)]
Fix a NaN issue on Intel.

5 years agoPack the gradients and image together into a single 32-bit texture; seems to help...
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.

5 years agoRemove some redundant glUseProgram() calls.
Steinar H. Gunderson [Fri, 3 Aug 2018 16:07:07 +0000 (18:07 +0200)]
Remove some redundant glUseProgram() calls.

5 years agoRemove an unused uniform.
Steinar H. Gunderson [Thu, 2 Aug 2018 22:19:55 +0000 (00:19 +0200)]
Remove an unused uniform.

5 years agoProperly release the flow texture; saves 1 ms (!) on FBO creation.
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.

5 years agoCompute diffusivity instead of smoothness, which saves a flow-size texture; shaves...
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.

5 years agoRemove some dead code.
Steinar H. Gunderson [Thu, 2 Aug 2018 17:31:38 +0000 (19:31 +0200)]
Remove some dead code.

5 years agoMicrooptimization in splat.vert.
Steinar H. Gunderson [Thu, 2 Aug 2018 17:31:23 +0000 (19:31 +0200)]
Microoptimization in splat.vert.

5 years agoShare VAOs between all the passes. Much less code, less rebinding overhead.
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.

5 years agoFix an issue where we would lose >1 ms for computing flow on NVIDIA, due to lack...
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.

5 years agoMake PersistentFBOSet handle depth.
Steinar H. Gunderson [Thu, 2 Aug 2018 15:56:58 +0000 (17:56 +0200)]
Make PersistentFBOSet handle depth.

5 years agoRemove the rather pointless enable_if tests for now. And move to C++14.
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.

5 years agoFix a GLSL syntax error that tripped up NVIDIA.
Steinar H. Gunderson [Thu, 2 Aug 2018 15:20:32 +0000 (17:20 +0200)]
Fix a GLSL syntax error that tripped up NVIDIA.

5 years agoDisable dither; we don't need it.
Steinar H. Gunderson [Thu, 2 Aug 2018 15:20:24 +0000 (17:20 +0200)]
Disable dither; we don't need it.

5 years agoWhen timing a level, print the resolution.
Steinar H. Gunderson [Thu, 2 Aug 2018 15:20:02 +0000 (17:20 +0200)]
When timing a level, print the resolution.

5 years agoMake a new flag --detailed-timing for microsecond measurements and more.
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.

5 years agoMove GPUTimers into its own file.
Steinar H. Gunderson [Thu, 2 Aug 2018 15:14:28 +0000 (17:14 +0200)]
Move GPUTimers into its own file.

5 years agoRemove an unused uniform.
Steinar H. Gunderson [Wed, 1 Aug 2018 23:15:30 +0000 (01:15 +0200)]
Remove an unused uniform.

5 years agoUse the same PBO readback system for interpolated images as flows.
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.

5 years agoSpeed up hole filling by ~10%.
Steinar H. Gunderson [Tue, 31 Jul 2018 15:06:19 +0000 (17:06 +0200)]
Speed up hole filling by ~10%.

5 years agoImplement hole filling.
Steinar H. Gunderson [Mon, 30 Jul 2018 23:10:15 +0000 (01:10 +0200)]
Implement hole filling.

5 years agoPut depth in 0..1; evidently even fp32 depth is clamped in the ARB version.
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.

5 years agoStart working on interpolation code.
Steinar H. Gunderson [Mon, 30 Jul 2018 16:08:23 +0000 (18:08 +0200)]
Start working on interpolation code.

5 years agoDo RGB -> grayscale conversion on the GPU.
Steinar H. Gunderson [Sat, 28 Jul 2018 18:53:46 +0000 (20:53 +0200)]
Do RGB -> grayscale conversion on the GPU.

5 years agoSplit texture pooling out from DISComputeFlow into its own class.
Steinar H. Gunderson [Sat, 28 Jul 2018 14:43:51 +0000 (16:43 +0200)]
Split texture pooling out from DISComputeFlow into its own class.

5 years agoHide the OpenGL window; it is rather annoying.
Steinar H. Gunderson [Sat, 28 Jul 2018 14:37:43 +0000 (16:37 +0200)]
Hide the OpenGL window; it is rather annoying.

5 years agoRemove a TODO.
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”.

5 years agoStop leaking texture views (and by extension, textures).
Steinar H. Gunderson [Sat, 28 Jul 2018 13:56:16 +0000 (15:56 +0200)]
Stop leaking texture views (and by extension, textures).

5 years agoSmall code cleanup.
Steinar H. Gunderson [Fri, 27 Jul 2018 14:10:23 +0000 (16:10 +0200)]
Small code cleanup.

5 years agoUse textureSize() instead of sending in uniforms manually. Same result, less code...
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.

5 years agoRemove a TODO; setting up equations is not where our time goes.
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.

5 years agoHalve the number of motion search iterations, to eight.
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.

5 years agoFinally get SOR working.
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).

5 years agoFix a mixup in the variational refinement text.
Steinar H. Gunderson [Thu, 26 Jul 2018 21:29:28 +0000 (23:29 +0200)]
Fix a mixup in the variational refinement text.

5 years agoClose off a TODO.
Steinar H. Gunderson [Thu, 26 Jul 2018 10:45:50 +0000 (12:45 +0200)]
Close off a TODO.

5 years agoRework patch placement. Finally inches our EPE just below the reference code, it...
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.

5 years agoTweak the default variational refinement weights (optimized on alley_2).
Steinar H. Gunderson [Wed, 25 Jul 2018 23:43:30 +0000 (01:43 +0200)]
Tweak the default variational refinement weights (optimized on alley_2).

5 years agoGive the variational refinement terms slightly less mysterious names.
Steinar H. Gunderson [Wed, 25 Jul 2018 23:39:47 +0000 (01:39 +0200)]
Give the variational refinement terms slightly less mysterious names.

5 years agoFix a done TODO (gamma is for E_G, not E_S, and we multiply in the alpha in the smoot...
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).

5 years agoSample gradient as zero outside the image, instead of repeating them. Helps dramatica...
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.

5 years agoSmall syntactic tweak.
Steinar H. Gunderson [Wed, 25 Jul 2018 13:32:56 +0000 (15:32 +0200)]
Small syntactic tweak.

5 years agoFix the patch out-of-bounds check in motion search (it was all broken).
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).

5 years agoFix a problem with visualizing flow that goes exactly left.
Steinar H. Gunderson [Tue, 24 Jul 2018 20:56:11 +0000 (22:56 +0200)]
Fix a problem with visualizing flow that goes exactly left.

5 years agoUse asynchronous readback when doing many flows. Speeds up 50-frame jobs by about...
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).

5 years agoFix some uniforms not getting through to the motion search vertex shader.
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.

5 years agoAdd a debugging flag to disable/ignore variational refinement.
Steinar H. Gunderson [Mon, 23 Jul 2018 23:22:25 +0000 (01:22 +0200)]
Add a debugging flag to disable/ignore variational refinement.

5 years agoChange the discard condition for motion search.
Steinar H. Gunderson [Mon, 23 Jul 2018 18:16:29 +0000 (20:16 +0200)]
Change the discard condition for motion search.

5 years agoFix a typo.
Steinar H. Gunderson [Mon, 23 Jul 2018 16:35:32 +0000 (18:35 +0200)]
Fix a typo.

5 years agoMake motion search happen mostly in pixels; a bit less code that way.
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.

5 years agoPrint EPE on stdout, since it is not an error.
Steinar H. Gunderson [Mon, 23 Jul 2018 13:52:49 +0000 (15:52 +0200)]
Print EPE on stdout, since it is not an error.

5 years agoMake flow writing a bit faster.
Steinar H. Gunderson [Mon, 23 Jul 2018 11:13:15 +0000 (13:13 +0200)]
Make flow writing a bit faster.

5 years agoPrint out the first flow pair, too.
Steinar H. Gunderson [Mon, 23 Jul 2018 11:13:02 +0000 (13:13 +0200)]
Print out the first flow pair, too.

5 years agoAdd a --disable-timing flag (less spew, less GPU waiting).
Steinar H. Gunderson [Mon, 23 Jul 2018 11:12:13 +0000 (13:12 +0200)]
Add a --disable-timing flag (less spew, less GPU waiting).

5 years agoAdd support for computing many flows sequentially (reduces startup overhead).
Steinar H. Gunderson [Mon, 23 Jul 2018 11:00:05 +0000 (13:00 +0200)]
Add support for computing many flows sequentially (reduces startup overhead).

5 years agoRefactor the flow writing.
Steinar H. Gunderson [Mon, 23 Jul 2018 10:42:45 +0000 (12:42 +0200)]
Refactor the flow writing.

5 years agoReuse textures between flow invocations.
Steinar H. Gunderson [Mon, 23 Jul 2018 10:33:22 +0000 (12:33 +0200)]
Reuse textures between flow invocations.

5 years agoMake a wrapper class for all the flow logic.
Steinar H. Gunderson [Mon, 23 Jul 2018 10:17:57 +0000 (12:17 +0200)]
Make a wrapper class for all the flow logic.

5 years agoRefactor FBO creation. A step on the way to persistent FBOs and temporary textures.
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.

5 years agoSmall cleanup.
Steinar H. Gunderson [Mon, 23 Jul 2018 08:56:30 +0000 (10:56 +0200)]
Small cleanup.

5 years agoMake the eval tool capable of taking the average over a series of flow files.
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.

5 years agoMake it possible to set alpha/delta/gamma on the command line, for grid searches.
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.

5 years agoAdd in the relative weighting of the variational refinement terms.
Steinar H. Gunderson [Sun, 22 Jul 2018 13:16:43 +0000 (15:16 +0200)]
Add in the relative weighting of the variational refinement terms.

5 years agoFix a comment.
Steinar H. Gunderson [Sun, 22 Jul 2018 13:14:38 +0000 (15:14 +0200)]
Fix a comment.

5 years agoAdd another missing clear.
Steinar H. Gunderson [Sat, 21 Jul 2018 22:43:35 +0000 (00:43 +0200)]
Add another missing clear.

5 years agoDeal with buggy GPU timers that go backwards.
Steinar H. Gunderson [Sat, 21 Jul 2018 22:32:03 +0000 (00:32 +0200)]
Deal with buggy GPU timers that go backwards.

5 years agoIf needed, resize the flow up (bilinearly) to the final size at the end.
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.

5 years agoHack around a convergence problem in the SOR code, by stopping the over-relaxation...
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.

5 years agoFix a typo.
Steinar H. Gunderson [Sat, 21 Jul 2018 14:10:29 +0000 (16:10 +0200)]
Fix a typo.

5 years agoSupport giving in file names on the command line.
Steinar H. Gunderson [Sat, 21 Jul 2018 14:09:11 +0000 (16:09 +0200)]
Support giving in file names on the command line.

5 years agoLoad arbitrary images through SDL_image, instead of requiring raw grayscale ones.
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.

5 years agoPack the two b values in the equations with shared exponent.
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.

5 years agoFix an algebra error in the E_I term.
Steinar H. Gunderson [Sat, 21 Jul 2018 08:49:42 +0000 (10:49 +0200)]
Fix an algebra error in the E_I term.

5 years agoFix some errors in the smoothness term.
Steinar H. Gunderson [Fri, 20 Jul 2018 23:30:14 +0000 (01:30 +0200)]
Fix some errors in the smoothness term.

5 years agoSmall notational tweak.
Steinar H. Gunderson [Fri, 20 Jul 2018 22:43:26 +0000 (00:43 +0200)]
Small notational tweak.

5 years agoAdd some missing clears.
Steinar H. Gunderson [Fri, 20 Jul 2018 22:03:22 +0000 (00:03 +0200)]
Add some missing clears.

5 years agoUpdate .gitignore.
Steinar H. Gunderson [Fri, 20 Jul 2018 19:56:30 +0000 (21:56 +0200)]
Update .gitignore.

5 years agoIn the variational refinement, change the flow unit from normalized coordinates to...
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.

5 years agoAdd a FIXME on the scissor.
Steinar H. Gunderson [Fri, 20 Jul 2018 19:27:32 +0000 (21:27 +0200)]
Add a FIXME on the scissor.

5 years agoAdd much more detailed GPU timers.
Steinar H. Gunderson [Fri, 20 Jul 2018 10:33:24 +0000 (12:33 +0200)]
Add much more detailed GPU timers.

5 years agoFix flow output after we did normalization in the add step.
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.

5 years agoAvoid infinities in a uniform.
Steinar H. Gunderson [Fri, 20 Jul 2018 09:32:37 +0000 (11:32 +0200)]
Avoid infinities in a uniform.

5 years agoFinish up the variational refinement, conceptually. Of course, it doesn't work yet.
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.

5 years agoImplement SOR.
Steinar H. Gunderson [Fri, 20 Jul 2018 08:33:56 +0000 (10:33 +0200)]
Implement SOR.

5 years agoCalculate smoothness and set up the equations. Still fairly buggy (missing 0..1 norma...
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).

5 years agoAlso calculate beta_0 when calculating derivatives.
Steinar H. Gunderson [Thu, 19 Jul 2018 21:16:22 +0000 (23:16 +0200)]
Also calculate beta_0 when calculating derivatives.

5 years agoFix some indentation.
Steinar H. Gunderson [Wed, 18 Jul 2018 18:45:33 +0000 (20:45 +0200)]
Fix some indentation.

5 years agoUse textureOffset() wherever possible to save some tedious arithmetic.
Steinar H. Gunderson [Wed, 18 Jul 2018 08:51:58 +0000 (10:51 +0200)]
Use textureOffset() wherever possible to save some tedious arithmetic.

5 years agoCalculate I_x and I_y for variational refinement.
Steinar H. Gunderson [Tue, 17 Jul 2018 12:41:55 +0000 (14:41 +0200)]
Calculate I_x and I_y for variational refinement.

5 years agoStart working on variational refinement.
Steinar H. Gunderson [Wed, 11 Jul 2018 22:44:17 +0000 (00:44 +0200)]
Start working on variational refinement.

5 years agoReduce the spam in apitrace a bit.
Steinar H. Gunderson [Wed, 11 Jul 2018 22:39:29 +0000 (00:39 +0200)]
Reduce the spam in apitrace a bit.

5 years agoDo patch normalization in densification.
Steinar H. Gunderson [Sat, 7 Jul 2018 11:41:13 +0000 (13:41 +0200)]
Do patch normalization in densification.

5 years agoIn densification, grow the patch a bit. Seemingly helps a lot on the EPE.
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.

5 years agoCorrect the sampling of the flow in the densification vertex shader.
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.

5 years agoRemove an unused sampler.
Steinar H. Gunderson [Sat, 7 Jul 2018 10:30:35 +0000 (12:30 +0200)]
Remove an unused sampler.

5 years agoFix the texel centers for motion search. Helps a whole lot.
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.

5 years agoRemove some duplicate vertex attributes.
Steinar H. Gunderson [Fri, 6 Jul 2018 23:10:32 +0000 (01:10 +0200)]
Remove some duplicate vertex attributes.

5 years agoUse fp16 for the densification output texture; evidently does not matter for quality.
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.

5 years agoRemove an unused uniform.
Steinar H. Gunderson [Fri, 6 Jul 2018 22:20:00 +0000 (00:20 +0200)]
Remove an unused uniform.

5 years agoCheck uniform locations ahead-of-time, for slightly reduced GL overhead.
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.