avcodec/mlp*: merge flags used by encoder and decoder
This commit is contained in:
@@ -70,6 +70,15 @@
|
|||||||
/** Code that signals end of a stream. */
|
/** Code that signals end of a stream. */
|
||||||
#define END_OF_STREAM 0xd234d234
|
#define END_OF_STREAM 0xd234d234
|
||||||
|
|
||||||
|
#define PARAM_BLOCKSIZE (1 << 7)
|
||||||
|
#define PARAM_MATRIX (1 << 6)
|
||||||
|
#define PARAM_OUTSHIFT (1 << 5)
|
||||||
|
#define PARAM_QUANTSTEP (1 << 4)
|
||||||
|
#define PARAM_FIR (1 << 3)
|
||||||
|
#define PARAM_IIR (1 << 2)
|
||||||
|
#define PARAM_HUFFOFFSET (1 << 1)
|
||||||
|
#define PARAM_PRESENCE (1 << 0)
|
||||||
|
|
||||||
#define FIR 0
|
#define FIR 0
|
||||||
#define IIR 1
|
#define IIR 1
|
||||||
|
|
||||||
|
@@ -93,14 +93,6 @@ typedef struct SubStream {
|
|||||||
|
|
||||||
/// Bitmask of which parameter sets are conveyed in a decoding parameter block.
|
/// Bitmask of which parameter sets are conveyed in a decoding parameter block.
|
||||||
uint8_t param_presence_flags;
|
uint8_t param_presence_flags;
|
||||||
#define PARAM_BLOCKSIZE (1 << 7)
|
|
||||||
#define PARAM_MATRIX (1 << 6)
|
|
||||||
#define PARAM_OUTSHIFT (1 << 5)
|
|
||||||
#define PARAM_QUANTSTEP (1 << 4)
|
|
||||||
#define PARAM_FIR (1 << 3)
|
|
||||||
#define PARAM_IIR (1 << 2)
|
|
||||||
#define PARAM_HUFFOFFSET (1 << 1)
|
|
||||||
#define PARAM_PRESENCE (1 << 0)
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
//@{
|
//@{
|
||||||
|
@@ -77,18 +77,8 @@ typedef struct MatrixParams {
|
|||||||
int8_t bypassed_lsbs[MAX_MATRICES][MAX_BLOCKSIZE];
|
int8_t bypassed_lsbs[MAX_MATRICES][MAX_BLOCKSIZE];
|
||||||
} MatrixParams;
|
} MatrixParams;
|
||||||
|
|
||||||
enum ParamFlags {
|
#define PARAMS_DEFAULT (0xff)
|
||||||
PARAMS_DEFAULT = 0xff,
|
#define PARAM_PRESENCE_FLAGS (1 << 8)
|
||||||
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,
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct DecodingParams {
|
typedef struct DecodingParams {
|
||||||
uint16_t blocksize; ///< number of PCM samples in current audio block
|
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 ||
|
if (prev_cp->codebook != cp->codebook ||
|
||||||
prev_cp->huff_lsbs != cp->huff_lsbs )
|
prev_cp->huff_lsbs != cp->huff_lsbs )
|
||||||
retval |= PARAM_PRESENT;
|
retval |= PARAM_PRESENCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
@@ -441,7 +431,7 @@ static void default_decoding_params(MLPEncodeContext *ctx, DecodingParams *dp)
|
|||||||
param_presence_flags |= PARAM_FIR;
|
param_presence_flags |= PARAM_FIR;
|
||||||
param_presence_flags |= PARAM_IIR;
|
param_presence_flags |= PARAM_IIR;
|
||||||
param_presence_flags |= PARAM_HUFFOFFSET;
|
param_presence_flags |= PARAM_HUFFOFFSET;
|
||||||
param_presence_flags |= PARAM_PRESENT;
|
param_presence_flags |= PARAM_PRESENCE;
|
||||||
|
|
||||||
dp->param_presence_flags = param_presence_flags;
|
dp->param_presence_flags = param_presence_flags;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user