[FFmpeg-soc] [soc]: r1025 - in jpeg2000: aec.c aec.h aecdec.c

k.nowosad subversion at mplayerhq.hu
Sun Aug 19 15:54:19 CEST 2007


Author: k.nowosad
Date: Sun Aug 19 15:54:19 2007
New Revision: 1025

Log:
minor changes in code and comments


Modified:
   jpeg2000/aec.c
   jpeg2000/aec.h
   jpeg2000/aecdec.c

Modified: jpeg2000/aec.c
==============================================================================
--- jpeg2000/aec.c	(original)
+++ jpeg2000/aec.c	Sun Aug 19 15:54:19 2007
@@ -29,7 +29,7 @@
 
 void ff_aec_init_contexts(AecState *aec)
 {
-    memset(aec->contexts, 0, 19*sizeof(AecContext));
+    memset(aec->contexts, 0, sizeof(aec->contexts));
     aec->contexts[AEC_CX_UNI].state = 46;
     aec->contexts[AEC_CX_RL].state = 3;
     aec->contexts[0].state = 4;

Modified: jpeg2000/aec.h
==============================================================================
--- jpeg2000/aec.h	(original)
+++ jpeg2000/aec.h	Sun Aug 19 15:54:19 2007
@@ -109,25 +109,21 @@ typedef struct {
 
 /** encoder */
 
+/** initialize the encoder */
 void ff_aec_initenc(AecState *aec, uint8_t *bp);
 
-/**
- * code bit d with context cx
- * */
+/** code bit d with context cx */
 void ff_aec_encode(AecState *aec, int cx, int d);
 
-/**
- * number of encoded bytes
- */
+/** number of encoded bytes */
 int ff_aec_length(AecState *aec);
 
-/**
- * flush the encoder [returns number of bytes encoded]
- * */
+/** flush the encoder [returns number of bytes encoded] */
 int ff_aec_flush(AecState *aec);
 
 /** decoder */
 
+/** initialize the decoder */
 void ff_aec_initdec(AecState *aec, uint8_t *bp);
 
 /** returns decoded bit with context cx */
@@ -135,6 +131,7 @@ int ff_aec_decode(AecState *aec, int cx)
 
 /** common */
 
+/** initialize the contexts */
 void ff_aec_init_contexts(AecState *aec);
 
 #endif

Modified: jpeg2000/aecdec.c
==============================================================================
--- jpeg2000/aecdec.c	(original)
+++ jpeg2000/aecdec.c	Sun Aug 19 15:54:19 2007
@@ -66,8 +66,8 @@ static int exchange(AecState *aec, int l
     do{
         if (!aec->ct)
             bytein(aec);
-        aec->a = aec->a << 1;
-        aec->c = aec->c << 1;
+        aec->a += aec->a;
+        aec->c += aec->c;
         aec->ct--;
     } while (!(aec->a & 0x8000));
     return d;



More information about the FFmpeg-soc mailing list