put median buffer on stack
Merge remote-tracking branch 'upstream/edge' into upstreamedge
Merge pull request #570 from wolfmanjm/upstreamedge

refactor median buffer