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

ramiro subversion at mplayerhq.hu
Sun Aug 10 18:31:11 CEST 2008


Author: ramiro
Date: Sun Aug 10 18:31:10 2008
New Revision: 3154

Log:
Don't use filters on frames that have restart headers.

Modified:
   mlp/mlpenc.c

Modified: mlp/mlpenc.c
==============================================================================
--- mlp/mlpenc.c	(original)
+++ mlp/mlpenc.c	Sun Aug 10 18:31:10 2008
@@ -555,10 +555,16 @@ static void input_data(MLPEncodeContext 
 }
 
 static void set_filter_params(MLPEncodeContext *ctx,
-                              unsigned int channel, unsigned int filter)
+                              unsigned int channel, unsigned int filter,
+                              int write_headers)
 {
     FilterParams *fp = &ctx->filter_params[channel][filter];
 
+    if (write_headers) {
+        fp->order    =  0;
+        return;
+    }
+
     if (filter == FIR) {
         fp->order    =  4;
         fp->shift    =  0;
@@ -1046,7 +1052,7 @@ static int mlp_encode_frame(AVCodecConte
 
     for (channel = 0; channel < avctx->channels; channel++) {
         for (filter = 0; filter < NUM_FILTERS; filter++)
-            set_filter_params(ctx, channel, filter);
+            set_filter_params(ctx, channel, filter, write_headers);
         apply_filter(ctx, channel);
     }
 



More information about the FFmpeg-soc mailing list