[FFmpeg-devel] [PATCH 1/4] zmbvenc: don't sum the entropy when blocks are equal
tjoppen at acc.umu.se
Tue Dec 25 11:35:27 EET 2018
lör 2018-12-22 klockan 15:32 +0000 skrev Matthew Fearnley:
> > > >
> > > Note that bw,bh aren't guaranteed to equal ZMBV_BLOCK, so `histogram ==
> > > bw*bh` would have to be used to guard against those (literal) edge cases.
> > Right, yes. But if we have block sizes other than ZMBV_BLOCK^2 then we
> > need score tables for those sizes too.
> I’ve thought about that a bit. I wondered if it would be worth it given:
> - the extra code, memory and logic needed
If you have a huge amount of DOS captures to optimize then it might be
worth it, else probably questionable
> - it would only improve the edge blocks
I imagine large blocks would be good for scenes with mostly global
motion. You cut down on the number of MVs and thus the amount of data
zlib has to compress, if the block size is a good fit.
> - the existing score table isn’t catastrophically bad for short blocks, and would still favour blocks with more common pixels.
> It would be better from a correctness perspective though, and effects on running time should be negligible.
Good point. There's also no telling whether the current model is
actually an accurate prediction of how zlib behaves :)
More information about the ffmpeg-devel