[video] code rewrite for vd