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

ramiro subversion at mplayerhq.hu
Wed Aug 13 22:19:59 CEST 2008


Author: ramiro
Date: Wed Aug 13 22:19:59 2008
New Revision: 3234

Log:
Remove bytestream and read directly using intxx_t.

Modified:
   mlp/mlpenc.c

Modified: mlp/mlpenc.c
==============================================================================
--- mlp/mlpenc.c	(original)
+++ mlp/mlpenc.c	Wed Aug 13 22:19:59 2008
@@ -22,7 +22,6 @@
 #include "avcodec.h"
 #include "bitstream.h"
 #include "libavutil/crc.h"
-#include "bytestream.h"
 #include "mlp.h"
 
 /* TODO add comments! */
@@ -433,6 +432,8 @@ static void write_decoding_params(MLPEnc
 static void input_data_internal(MLPEncodeContext *ctx, const uint8_t *samples,
                                 int32_t *lossless_check_data, int is24)
 {
+    const int32_t *samples_32 = (const int32_t *) samples;
+    const int16_t *samples_16 = (const int16_t *) samples;
     unsigned int substr;
 
     for (substr = 0; substr < ctx->num_substreams; substr++) {
@@ -446,8 +447,8 @@ static void input_data_internal(MLPEncod
             for (channel = 0; channel <= rh->max_channel; channel++) {
                 int32_t sample;
 
-                if (is24) sample = (int32_t) bytestream_get_le32(&samples);
-                else      sample = (int16_t) bytestream_get_le16(&samples);
+                if (is24) sample = *samples_32++;
+                else      sample = *samples_16++;
 
                 sample <<= dp->quant_step_size[channel];
 



More information about the FFmpeg-soc mailing list