[FFmpeg-soc] [soc]: r3409 - mlp/mlpenc.c

ramiro subversion at mplayerhq.hu
Sun Aug 17 22:25:12 CEST 2008


Author: ramiro
Date: Sun Aug 17 22:25:12 2008
New Revision: 3409

Log:
Move up some functions that will be used in other places.

Modified:
   mlp/mlpenc.c

Modified: mlp/mlpenc.c
==============================================================================
--- mlp/mlpenc.c	(original)
+++ mlp/mlpenc.c	Sun Aug 17 22:25:12 2008
@@ -234,6 +234,38 @@ static uint8_t code_channels3(int channe
     }
 }
 
+static void clear_decoding_params(DecodingParams decoding_params[MAX_SUBSTREAMS])
+{
+    unsigned int substr;
+
+    for (substr = 0; substr < MAX_SUBSTREAMS; substr++) {
+        DecodingParams *dp = &decoding_params[substr];
+
+        dp->param_presence_flags   = 0xff;
+        dp->num_primitive_matrices = 0;
+        dp->blocksize              = 8;
+
+        memset(dp->output_shift   , 0, sizeof(dp->output_shift   ));
+        memset(dp->quant_step_size, 0, sizeof(dp->quant_step_size));
+    }
+}
+
+static void clear_channel_params(ChannelParams channel_params[MAX_CHANNELS])
+{
+    unsigned int channel;
+
+    for (channel = 0; channel < MAX_CHANNELS; channel++) {
+        ChannelParams *cp = &channel_params[channel];
+
+        memset(&cp->filter_params, 0, sizeof(cp->filter_params));
+
+        /* Default audio coding is 24-bit raw PCM. */
+        cp->huff_offset      =  0;
+        cp->codebook         =  0;
+        cp->huff_lsbs        = 24;
+    }
+}
+
 static av_cold int mlp_encode_init(AVCodecContext *avctx)
 {
     MLPEncodeContext *ctx = avctx->priv_data;
@@ -1197,38 +1229,6 @@ static uint8_t *write_substrs(MLPEncodeC
     return buf;
 }
 
-static void clear_decoding_params(DecodingParams decoding_params[MAX_SUBSTREAMS])
-{
-    unsigned int substr;
-
-    for (substr = 0; substr < MAX_SUBSTREAMS; substr++) {
-        DecodingParams *dp = &decoding_params[substr];
-
-        dp->param_presence_flags   = 0xff;
-        dp->num_primitive_matrices = 0;
-        dp->blocksize              = 8;
-
-        memset(dp->output_shift   , 0, sizeof(dp->output_shift   ));
-        memset(dp->quant_step_size, 0, sizeof(dp->quant_step_size));
-    }
-}
-
-static void clear_channel_params(ChannelParams channel_params[MAX_CHANNELS])
-{
-    unsigned int channel;
-
-    for (channel = 0; channel < MAX_CHANNELS; channel++) {
-        ChannelParams *cp = &channel_params[channel];
-
-        memset(&cp->filter_params, 0, sizeof(cp->filter_params));
-
-        /* Default audio coding is 24-bit raw PCM. */
-        cp->huff_offset      =  0;
-        cp->codebook         =  0;
-        cp->huff_lsbs        = 24;
-    }
-}
-
 static int mlp_encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf_size,
                             void *data)
 {



More information about the FFmpeg-soc mailing list