[FFmpeg-devel] [PATCH 3/9] avcodec/opusenc_psy: Remove unused/write-only context members
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Fri Oct 7 23:25:02 EEST 2022
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavcodec/opusenc_psy.c | 5 -----
libavcodec/opusenc_psy.h | 11 -----------
2 files changed, 16 deletions(-)
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;
--
2.34.1
More information about the ffmpeg-devel
mailing list