[FFmpeg-soc] [soc]: r3629 - mlp/mlpenc.c
ramiro
subversion at mplayerhq.hu
Tue Aug 26 22:29:59 CEST 2008
Author: ramiro
Date: Tue Aug 26 22:29:59 2008
New Revision: 3629
Log:
Move restart channel and decoding params out of the context. They are only
initialized once and never change afterwards.
Modified:
mlp/mlpenc.c
Modified: mlp/mlpenc.c
==============================================================================
--- mlp/mlpenc.c (original)
+++ mlp/mlpenc.c Tue Aug 26 22:29:59 2008
@@ -140,9 +140,6 @@ typedef struct {
DecodingParams decoding_params[MAJOR_HEADER_INTERVAL][MAJOR_HEADER_INTERVAL][MAJOR_HEADER_INTERVAL][MAX_SUBBLOCKS][MAX_SUBSTREAMS];
RestartHeader restart_header [MAX_SUBSTREAMS];
- ChannelParams restart_channel_params[MAX_CHANNELS];
- DecodingParams restart_decoding_params[MAX_SUBSTREAMS];
-
ChannelParams major_channel_params[MAJOR_HEADER_INTERVAL][MAX_SUBBLOCKS][MAX_CHANNELS]; ///< ChannelParams to be written to bitstream.
DecodingParams major_decoding_params[MAJOR_HEADER_INTERVAL][MAX_SUBBLOCKS][MAX_SUBSTREAMS]; ///< DecodingParams to be written to bitstream.
int major_params_changed[MAJOR_HEADER_INTERVAL][MAX_SUBBLOCKS][MAX_SUBSTREAMS]; ///< params_changed to be written to bitstream.
@@ -167,6 +164,9 @@ typedef struct {
DSPContext dsp;
} MLPEncodeContext;
+static ChannelParams restart_channel_params[MAX_CHANNELS];
+static DecodingParams restart_decoding_params[MAX_SUBSTREAMS];
+
#define SYNC_MAJOR 0xf8726f
#define SYNC_MLP 0xbb
@@ -582,8 +582,8 @@ static av_cold int mlp_encode_init(AVCod
rh->max_matrix_channel = 1;
}
- clear_channel_params(ctx->restart_channel_params);
- clear_decoding_params(ctx->restart_decoding_params);
+ clear_channel_params(restart_channel_params);
+ clear_decoding_params(restart_decoding_params);
for (index3 = 0; index3 < MAJOR_HEADER_INTERVAL; index3++) {
for (index2 = 0; index2 < MAJOR_HEADER_INTERVAL; index2++) {
@@ -1777,8 +1777,8 @@ static void set_major_params(MLPEncodeCo
ctx->cur_restart_header = &ctx->restart_header[substr];
- ctx->prev_decoding_params = &ctx->restart_decoding_params[substr];
- ctx->prev_channel_params = ctx->restart_channel_params;
+ ctx->prev_decoding_params = &restart_decoding_params[substr];
+ ctx->prev_channel_params = restart_channel_params;
for (index = 0; index < MAJOR_HEADER_INTERVAL; index++) {
for (subblock = 0; subblock <= num_subblocks; subblock++) {
More information about the FFmpeg-soc
mailing list