bps commented on slide_025 of Camera Processing Pipeline II ()

I think the lines setting w1 and w2 are wrong, the conditional should be flipped.


gkatz commented on slide_023 of Camera Processing Pipeline II ()

Also shouldn't the inner loops be jj<4 and ii<4 instead of 3? Similarly the weights indexing should be weights[jj*4+ii] rather than 3.


kayvonf commented on slide_092 of Camera Processing Pipeline ()

Yes, that is a typo. Will fix.


ankitmathur commented on slide_023 of Camera Processing Pipeline II ()

The numbers in the weights array should be explicitly cast to floats or else they all seem to be 0


gkatz commented on slide_092 of Camera Processing Pipeline ()

Should the Wp equation perhaps not include the last I(x-i,y-j) term?


wuhao20 commented on slide_045 of Camera Processing Pipeline II ()

Horizontal axis is spatial, the vertical level represents the coefficients of the laplacian pyramid.


wuhao20 commented on slide_067 of Camera Processing Pipeline ()

How do we determine the level of blurring for the chromatic channels? What should be the size of the filter?


kayvonf commented on slide_107 of Camera Processing Pipeline ()

Here, "temporal mean" is simply summing all images in the burst (no alignment). The third column sums the images after alignment. The right-most column, the final result is produced by a weighted sum of the aligned images, with a weight that is greater when the algorithm is confident about the quality of the alignment. (Intuition: downweight images that cannot be well aligned with the reference image)


vincentsc commented on slide_002 of Camera Processing Pipeline ()

what kind of trade-offs do smartphone camera manufacturers make between hardware vs. software optimizations? is one easier than the other for phones with "small" form factors?


For straightforward conditional expressions like this, it is true that a compiler might be able to recognize the pattern and then reorganize the code to maintain coherent execution. However, providing such an optimization might cause confusion for the programmer because there's a non-trivial difference between the code they wrote and what is being executed. For example, if the programmer changed the conditional to a more complex expression and the compiler can no longer recognize that it can apply this optimization, then the programmer will observe a huge performance drop! Without understanding how the compiler works, they would likely believe the performance difference was due to the increased computation of the conditional.

Drawing clear lines between what the programmer needs to think about (the abstraction) and what the system is responsible for handling automatically (the implementation) will be a major theme of this course.

Side note: In general, a major design decision for efficient parallel programs that utilize SIMD is to avoid "divergent" execution caused by conditionals. For example, in ray tracing, there have been several papers on adaptively reorganizing data to ensure conditionals do not cause divergent execution: https://graphics.stanford.edu/~boulos/papers/reorder_rt08.pdf


Sketchpad in action (with comments by Alan Kay): https://www.youtube.com/watch?v=495nCzxM9PI



I was a little confused by the simple worst case example of 1/8th performance provided in class using a conditional on (i % 8 == 0). It seems to me that in a language that knows the contents of the loop are independent, it should be fairly easy for the compiler to include an optimization that bundles together all the expensive iterations where i % 8 == 0 (assuming it is possible for implementations like the above to handle operating on chunks of data that aren't necessarily contiguous). Of course this is only possible since the conditional only depends on the loop iteration and not a more complex value, so perhaps this optimization is too specific to be worth it for real systems?