[FFmpeg-devel] [PATCH 1/9] avcodec/opus_rc: Remove write-only waste from OpusRangeCoder
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Fri Oct 7 23:20:27 EEST 2022
Write-only since e7d977b446194649aa30f2aacc6c17bce7aeb90b
(and local to ff_opus_rc_enc_end() before that).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavcodec/opus_rc.c | 2 --
libavcodec/opus_rc.h | 3 ---
2 files changed, 5 deletions(-)
diff --git a/libavcodec/opus_rc.c b/libavcodec/opus_rc.c
index c432eb90c9..2061418e52 100644
--- a/libavcodec/opus_rc.c
+++ b/libavcodec/opus_rc.c
@@ -383,8 +383,6 @@ void ff_opus_rc_enc_end(OpusRangeCoder *rc, uint8_t *dst, int size)
rng_bytes = rc->rng_cur - rc->buf;
memcpy(dst, rc->buf, rng_bytes);
- rc->waste = size*8 - (rc->rb.bytes*8 + rc->rb.cachelen) - rng_bytes*8;
-
/* Put the rawbits part, if any */
if (rc->rb.bytes || rc->rb.cachelen) {
int i, lap;
diff --git a/libavcodec/opus_rc.h b/libavcodec/opus_rc.h
index 627f83229e..1b3cb93a15 100644
--- a/libavcodec/opus_rc.h
+++ b/libavcodec/opus_rc.h
@@ -49,9 +49,6 @@ typedef struct OpusRangeCoder {
uint8_t *rng_cur; /* Current range coded byte */
int ext; /* Awaiting propagation */
int rem; /* Carryout flag */
-
- /* Encoding stats */
- int waste;
} OpusRangeCoder;
/**
--
2.34.1
More information about the ffmpeg-devel
mailing list