mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
avcodec/rangecoder: factorize termination version code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
41c1643d75
commit
1be9a28f8e
6 changed files with 10 additions and 12 deletions
|
|
@ -106,8 +106,10 @@ void ff_build_rac_states(RangeCoder *c, int factor, int max_p)
|
|||
}
|
||||
|
||||
/* Return the number of bytes written. */
|
||||
int ff_rac_terminate(RangeCoder *c)
|
||||
int ff_rac_terminate(RangeCoder *c, int version)
|
||||
{
|
||||
if (version == 1)
|
||||
put_rac(c, (uint8_t[]) { 129 }, 0);
|
||||
c->range = 0xFF;
|
||||
c->low += 0xFF;
|
||||
renorm_encoder(c);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue