[FFmpeg-cvslog] avcodec/mlpenc: increase compression ratio even more, fix LPC parameters

Paul B Mahol git at videolan.org
Mon Oct 2 21:33:01 EEST 2023


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Oct  2 19:29:26 2023 +0200| [a1b29ab60d20ccd45ec99dddcf52db06e1de5c60] | committer: Paul B Mahol

avcodec/mlpenc: increase compression ratio even more, fix LPC parameters

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a1b29ab60d20ccd45ec99dddcf52db06e1de5c60
---

 libavcodec/mlpenc.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c
index cb4eabbae2..5bf2607ca2 100644
--- a/libavcodec/mlpenc.c
+++ b/libavcodec/mlpenc.c
@@ -41,7 +41,7 @@
 
 #define MLP_MIN_LPC_ORDER      1
 #define MLP_MAX_LPC_ORDER      8
-#define MLP_MIN_LPC_SHIFT      8
+#define MLP_MIN_LPC_SHIFT      0
 #define MLP_MAX_LPC_SHIFT     15
 
 typedef struct {
@@ -1334,13 +1334,12 @@ static void set_filter_params(MLPEncodeContext *ctx,
     } else if (filter == IIR) {
         fp->order = 0;
     } else if (filter == FIR) {
-        const int max_order = (ctx->substream_info & SUBSTREAM_INFO_HIGH_RATE)
-                              ? 4 : MLP_MAX_LPC_ORDER;
+        const int max_order = MAX_FIR_ORDER;
         int32_t *sample_buffer = ctx->sample_buffer + channel;
         int32_t coefs[MAX_LPC_ORDER][MAX_LPC_ORDER];
         int32_t *lpc_samples = ctx->lpc_sample_buffer;
         int32_t *fcoeff = ctx->cur_channel_params[channel].coeff[filter];
-        int shift[MLP_MAX_LPC_ORDER];
+        int shift[MAX_LPC_ORDER];
         int order;
 
         for (unsigned int i = 0; i < ctx->number_of_samples; i++) {



More information about the ffmpeg-cvslog mailing list