summaryrefslogtreecommitdiff
path: root/libavcodec/mlpenc.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2023-10-18 22:56:52 +0200
committerPaul B Mahol <onemda@gmail.com>2023-10-18 23:01:40 +0200
commite7a6bba51a0efc0d59aa1fc98527c4bef58651c3 (patch)
tree71f1f685d6f52c60b9b1d672eea7805f9a359aa4 /libavcodec/mlpenc.c
parentbe2bbfe71d5566b009f3695636285d89747a741e (diff)
avcodec/mlp*: merge flags used by encoder and decoder
Diffstat (limited to 'libavcodec/mlpenc.c')
-rw-r--r--libavcodec/mlpenc.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c
index c0534ea510..70f9120e8b 100644
--- a/libavcodec/mlpenc.c
+++ b/libavcodec/mlpenc.c
@@ -77,18 +77,8 @@ typedef struct MatrixParams {
int8_t bypassed_lsbs[MAX_MATRICES][MAX_BLOCKSIZE];
} MatrixParams;
-enum ParamFlags {
- PARAMS_DEFAULT = 0xff,
- PARAM_PRESENCE_FLAGS = 1 << 8,
- PARAM_BLOCKSIZE = 1 << 7,
- PARAM_MATRIX = 1 << 6,
- PARAM_OUTSHIFT = 1 << 5,
- PARAM_QUANTSTEP = 1 << 4,
- PARAM_FIR = 1 << 3,
- PARAM_IIR = 1 << 2,
- PARAM_HUFFOFFSET = 1 << 1,
- PARAM_PRESENT = 1 << 0,
-};
+#define PARAMS_DEFAULT (0xff)
+#define PARAM_PRESENCE_FLAGS (1 << 8)
typedef struct DecodingParams {
uint16_t blocksize; ///< number of PCM samples in current audio block
@@ -334,7 +324,7 @@ static int compare_decoding_params(MLPEncodeContext *ctx,
if (prev_cp->codebook != cp->codebook ||
prev_cp->huff_lsbs != cp->huff_lsbs )
- retval |= PARAM_PRESENT;
+ retval |= PARAM_PRESENCE;
}
return retval;
@@ -441,7 +431,7 @@ static void default_decoding_params(MLPEncodeContext *ctx, DecodingParams *dp)
param_presence_flags |= PARAM_FIR;
param_presence_flags |= PARAM_IIR;
param_presence_flags |= PARAM_HUFFOFFSET;
- param_presence_flags |= PARAM_PRESENT;
+ param_presence_flags |= PARAM_PRESENCE;
dp->param_presence_flags = param_presence_flags;
}