 
 __global__ void medianFilter(
 	cudaSurfaceObject_t dst,
-	const float4* __restrict__ src,
-	idaten::SVGFPathTracing::AOV* curAovs,
-	const idaten::SVGFPathTracing::AOV* __restrict__ prevAovs,
-	const aten::mat4* __restrict__ mtxs,
-	const idaten::SVGFPathTracing::Path* __restrict__ paths,
+	float4* curAovColorVariance,
+	float4* curAovMomentMeshid,
+	const float4* __restrict__ prevAovMomentMeshid,
 	int width, int height)
 {
 	int ix = blockIdx.x * blockDim.x + threadIdx.x;

	const float4* __restrict__ prevAovMomentMeshid,
	cudaSurfaceObject_t motionDetphBuffer,
	cudaSurfaceObject_t dst,
	float4* tmpBuffer,
	int width, int height)
{
	int ix = blockIdx.x * blockDim.x + threadIdx.x;

#define mnmx5(a, b, c, d, e)	s2(a, b); s2(c, d); mn3(a, c, e); mx3(b, d, e);           // 6 exchanges
#define mnmx6(a, b, c, d, e, f) s2(a, d); s2(b, e); s2(c, f); mn3(a, b, c); mx3(d, e, f); // 7 exchanges

inline __device__ float3 medianFilter(
	int ix, int iy,
	const float4* src,
	int width, int height)
{
	float3 v[9];
