▲ | pornel 4 days ago | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Motion vectors in video codecs are an equivalent of a 2D projection of 3D motion vectors. In typical video encoding motion compensation of course isn't derived from real 3D motion vectors, it's merely a heuristic based on optical flow and a bag of tricks, but in principle the actual game's motion vectors could be used to guide video's motion compensation. This is especially true when we're talking about a custom codec, and not reusing the H.264 bitstream format. Referencing previous frames doesn't add latency, and limiting motion to just displacement of the previous frame would be computationally relatively simple. You'd need some keyframes or gradual refresh to avoid "datamoshing" look persisting on packet loss. However, the challenge is in encoding the motion precisely enough to make it useful. If it's not aligned with sub-pixel precision it may make textures blurrier and make movement look wobbly almost like PS1 games. It's hard to fix that by encoding the diff, because the diff ends up having high frequencies that don't survive compression. Motion compensation also should be encoded with sharp boundaries between objects, as otherwise it causes shimmering around edges. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | CyberDildonics 4 days ago | parent [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Motion vectors in video codecs are an equivalent of a 2D projection of 3D motion vectors. 3D motion vectors always get projected to 2D anyway. They also aren't used for moving blocks of pixels around, they are floating point values that get used along with a depth map to re-rasterize an image with motion blur. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|