VapourSynth plugin to reverse upscaling and restore original resolution
VapourSynth plugin to undo upscaling
vapoursynth-descale$ import vapoursynth as vs; core = vs.core; core.descale.Descale(clip, 1280, 720, kernel='lanczos')$ core.descale.Descale(clip, 1280, 720, kernel='bicubic', b=0, c=0.5)$ vspipe -c y4m script.vpy - | ffmpeg -i pipe: output.mkv