encoder video and downsampler