diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-03-25 12:52:56 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-03-30 12:36:32 +0200 |
commit | c81b8e04aa0952a7aec1e08940f29ae501fb6bfd (patch) | |
tree | 34c1d0dd6c2262ef83efa3ae77ea704580144050 /libavcodec/mjpegenc.c | |
parent | 73fb1b8a9bd6a563a6b58ce8aa215f2f07e91f57 (diff) |
Avoid intermediate bitcount for number of bytes in PutBitContext
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/mjpegenc.c')
-rw-r--r-- | libavcodec/mjpegenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index 22af094da7..df3aaaf26b 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -218,7 +218,7 @@ int ff_mjpeg_encode_stuffing(MpegEncContext *s) if ((s->avctx->active_thread_type & FF_THREAD_SLICE) && mb_y < s->mb_height - 1) put_marker(pbc, RST0 + (mb_y&7)); - s->esc_pos = put_bits_count(pbc) >> 3; + s->esc_pos = put_bytes_count(pbc, 0); fail: for (int i = 0; i < 3; i++) |