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

ramiro subversion at mplayerhq.hu
Sun Aug 10 14:51:58 CEST 2008


Author: ramiro
Date: Sun Aug 10 14:51:58 2008
New Revision: 3130

Log:
Pass only PutBitContext *pb and no uint8_t *buf to write_restart_header()
and use pb->buf instead.

Modified:
   mlp/mlpenc.c

Modified: mlp/mlpenc.c
==============================================================================
--- mlp/mlpenc.c	(original)
+++ mlp/mlpenc.c	Sun Aug 10 14:51:58 2008
@@ -244,8 +244,7 @@ lucky 1054c0300008080001b538c
     AV_WL16(buf+26, mlp_checksum16(buf, 26));
 }
 
-/* TODO pass only PutBitContext and use pb->buffer. */
-static void write_restart_header(MLPEncodeContext *ctx, uint8_t *buf,
+static void write_restart_header(MLPEncodeContext *ctx,
                                  PutBitContext *pb, int substr)
 {
     RestartHeader *rh = &ctx->restart_header[substr];
@@ -278,7 +277,7 @@ static void write_restart_header(MLPEnco
     tmpb = *pb;
     flush_put_bits(&tmpb);
 
-    checksum = mlp_restart_checksum(buf, put_bits_count(pb) - start_count);
+    checksum = mlp_restart_checksum(pb->buf, put_bits_count(pb) - start_count);
 
     put_bits(pb,  8, checksum);
 }
@@ -1056,7 +1055,7 @@ static int mlp_encode_frame(AVCodecConte
             if (write_headers) {
                 put_bits(&pb, 1, 1);
 
-                write_restart_header(ctx, buf, &pb, substr);
+                write_restart_header(ctx, &pb, substr);
                 rh->lossless_check_data = 0;
             } else {
                 put_bits(&pb, 1, 0);



More information about the FFmpeg-soc mailing list