View Single Post
Old 4th April 2018, 18:27   #5995  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
Quote:
Originally Posted by foxyshadis View Post
By the time the encoder would have even a rough idea of the global motion of the frame, more than half the blocks would already be quantized and done. x265 doesn't do any global motion estimation in the lookahead phase, it just decides if a scenecut is warranted, and everything else happens in a huge combined phase that outputs blocks as it gobbles them up.

Maybe a check for the inverse of emergency VBV could be enabled: Once the frame is over, go back and say "hey, that frame was pretty easy after all and didn't need to be so overcompressed." Or since global motion is known by the end, look back and see the oops before flushing the frame. Performance would take a pretty big hit every time it happened, especially if it affects future frames that are already mid-encode, but you need quality modes too. --aq-motion has promise in increasing overall quality, managing it just seems difficult.
Good analysis. That said, doing a coarse estimate of global motion in a downrezzed frame during lookahead is a perfectly reasonable strategy. Also the 1st pass global motion is known in later passes, so the above could work with 2-pass or even refine analysis. Global motion should be pretty consistent across frame sizes, so data from a lower Rez can be reused it doing an adaptation set.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote