diff mbox series

[FFmpeg-devel,3/9] avcodec/opusenc_psy: Remove unused/write-only context members

Message ID GV1P250MB0737DCBC76143851D062099B8F5F9@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit a4dc60a2582ae130b89e07d0c1a5aa764c1a3d7e
Headers show
Series [FFmpeg-devel,1/9] avcodec/opus_rc: Remove write-only waste from OpusRangeCoder | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Oct. 7, 2022, 8:25 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/opusenc_psy.c |  5 -----
 libavcodec/opusenc_psy.h | 11 -----------
 2 files changed, 16 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/opusenc_psy.c b/libavcodec/opusenc_psy.c
index 94c37fb8b1..5c768ae68e 100644
--- a/libavcodec/opusenc_psy.c
+++ b/libavcodec/opusenc_psy.c
@@ -470,12 +470,9 @@  int ff_opus_psy_celt_frame_process(OpusPsyContext *s, CeltFrame *f, int index)
 
     if (f->transient != start_transient_flag) {
         f->blocks = f->transient ? OPUS_BLOCK_SIZE(s->p.framesize)/CELT_OVERLAP : 1;
-        s->redo_analysis = 1;
         return 1;
     }
 
-    s->redo_analysis = 0;
-
     return 0;
 }
 
@@ -509,7 +506,6 @@  void ff_opus_psy_postencode_update(OpusPsyContext *s, CeltFrame *f)
 
     s->avg_is_band /= (s->p.frames + 1);
 
-    s->cs_num = 0;
     s->steps_to_process = 0;
     s->buffered_steps -= steps_out;
     s->total_packets_out += s->p.frames;
@@ -521,7 +517,6 @@  av_cold int ff_opus_psy_init(OpusPsyContext *s, AVCodecContext *avctx,
 {
     int i, ch, ret;
 
-    s->redo_analysis = 0;
     s->lambda = 1.0f;
     s->options = options;
     s->avctx = avctx;
diff --git a/libavcodec/opusenc_psy.h b/libavcodec/opusenc_psy.h
index ee58b0cdf9..bc1a88c03d 100644
--- a/libavcodec/opusenc_psy.h
+++ b/libavcodec/opusenc_psy.h
@@ -49,20 +49,12 @@  typedef struct OpusBandExcitation {
     float excitation_init;
 } OpusBandExcitation;
 
-typedef struct PsyChain {
-    int start;
-    int end;
-} PsyChain;
-
 typedef struct OpusPsyContext {
     AVCodecContext *avctx;
     AVFloatDSPContext *dsp;
     struct FFBufQueue *bufqueue;
     OpusEncOptions *options;
 
-    PsyChain cs[128];
-    int cs_num;
-
     OpusBandExcitation ex[OPUS_MAX_CHANNELS][CELT_MAX_BANDS];
     FFBesselFilter bfilter_lo[OPUS_MAX_CHANNELS][CELT_MAX_BANDS];
     FFBesselFilter bfilter_hi[OPUS_MAX_CHANNELS][CELT_MAX_BANDS];
@@ -78,15 +70,12 @@  typedef struct OpusPsyContext {
     DECLARE_ALIGNED(32, float, scratch)[2048];
 
     /* Stats */
-    float rc_waste;
     float avg_is_band;
     int64_t dual_stereo_used;
     int64_t total_packets_out;
 
     /* State */
-    FFBesselFilter lambda_lp;
     OpusPacketInfo p;
-    int redo_analysis;
     int buffered_steps;
     int steps_to_process;
     int eof;