aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ffv1enc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-25 12:52:56 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-03-30 12:36:32 +0200
commitc81b8e04aa0952a7aec1e08940f29ae501fb6bfd (patch)
tree34c1d0dd6c2262ef83efa3ae77ea704580144050 /libavcodec/ffv1enc.c
parent73fb1b8a9bd6a563a6b58ce8aa215f2f07e91f57 (diff)
downloadffmpeg-c81b8e04aa0952a7aec1e08940f29ae501fb6bfd.tar.gz
Avoid intermediate bitcount for number of bytes in PutBitContext
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/ffv1enc.c')
-rw-r--r--libavcodec/ffv1enc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 611b250e96..cdad65a4f9 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -1239,7 +1239,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
bytes = ff_rac_terminate(&fs->c, 1);
} else {
flush_put_bits(&fs->pb); // FIXME: nicer padding
- bytes = fs->ac_byte_count + (put_bits_count(&fs->pb) + 7) / 8;
+ bytes = fs->ac_byte_count + put_bytes_output(&fs->pb);
}
if (i > 0 || f->version > 2) {
av_assert0(bytes < pkt->size / f->slice_count);