If both your input and output are 16-bit you should use a source filter that can preserve that precision, like
this modified ffms. ImageSource outputs 8-bit.
Code:
FFVideoSource("input.png", cache=False, seekmode=-1, enable10bithack=True) # stacked YV24
f3kdb(Y=0, Cb=0, Cr=0, grainY=0, grainC=0, input_depth=16, input_mode=1, output_depth=16, output_mode=2)