]> git.sesse.net Git - ffmpeg/commit
avcodec/proresenc_kostya: Factor flushing PutBitContext out
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 25 Mar 2021 10:30:06 +0000 (11:30 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Tue, 30 Mar 2021 10:36:32 +0000 (12:36 +0200)
commitf9d1528fc900dac4975ce785dd95004daeacec39
tree9544eec048c127fa6c1dc1efde3c2c2b4167b0c7
parentdf1c30f139bd4c4d5426d4fc169a1a2c16f95163
avcodec/proresenc_kostya: Factor flushing PutBitContext out

The function to write an ordinary (luma or chroma) plane as well as
the function for writing an alpha plane have some similarities:
They record the initial bitposition (despite said position always being
byte-aligned), flush the PutBitContext themselves and return the amount
of bytes they wrote.

This commit factors this out; it also replaces bitpositions by
bytepositions and it avoids recording the initial byteposition because
said information is already available from the position at the end of
the last plane.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/proresenc_kostya.c