[cvs] / xvidcore / src / quant / adapt_quant.c Repository:
ViewVC logotype

Diff of /xvidcore/src/quant/adapt_quant.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5, Sun Aug 4 17:28:50 2002 UTC revision 1.6, Wed Sep 4 18:44:40 2002 UTC
# Line 65  Line 65 
65  {  {
66          int i, j, k, l;          int i, j, k, l;
67    
68          static float *quant;          float *quant;
69          unsigned char *ptr;          unsigned char *ptr;
70          float *val;          float *val;
71          float global = 0.;          float global = 0.;
# Line 84  Line 84 
84          const float LowerLimit = 25;          const float LowerLimit = 25;
85    
86    
         if (!quant)  
87                  if (!(quant = (float *) malloc(mb_width * mb_height * sizeof(float))))                  if (!(quant = (float *) malloc(mb_width * mb_height * sizeof(float))))
88                          return -1;                  return(-1);
89    
90          val = (float *) malloc(mb_width * mb_height * sizeof(float));          if(!(val = (float *) malloc(mb_width * mb_height * sizeof(float))))
91                    return(-1);
92    
93          for (k = 0; k < mb_height; k++) {          for (k = 0; k < mb_height; k++) {
94                  for (l = 0; l < mb_width; l++)  // do this for all macroblocks individually                  for (l = 0; l < mb_width; l++)  // do this for all macroblocks individually
# Line 131  Line 131 
131                  }                  }
132          }          }
133          free(val);          free(val);
134            free(quant);
135          return normalize_quantizer_field(quant, intquant, mb_width * mb_height,          return normalize_quantizer_field(quant, intquant, mb_width * mb_height,
136                                                                           min_quant, max_quant);                                                                           min_quant, max_quant);
137  }  }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4