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

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

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

revision 443, Sat Sep 7 12:51:38 2002 UTC revision 496, Fri Sep 20 20:17:22 2002 UTC
# Line 28  Line 28 
28   *  along with this program ; if not, write to the Free Software   *  along with this program ; if not, write to the Free Software
29   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
30   *   *
31   *  $Id: adapt_quant.c,v 1.7 2002-09-07 12:51:38 edgomez Exp $   *  $Id: adapt_quant.c,v 1.9 2002-09-20 20:17:22 edgomez Exp $
32   *   *
33   ****************************************************************************/   ****************************************************************************/
34    
# Line 125  Line 125 
125          if (!(quant = (float *) malloc(mb_width * mb_height * sizeof(float))))          if (!(quant = (float *) malloc(mb_width * mb_height * sizeof(float))))
126                  return(-1);                  return(-1);
127    
128          if(!(val = (float *) malloc(mb_width * mb_height * sizeof(float))))          if(!(val = (float *) malloc(mb_width * mb_height * sizeof(float)))) {
129                    free(quant);
130                  return(-1);                  return(-1);
131            }
132    
133          for (k = 0; k < mb_height; k++) {          for (k = 0; k < mb_height; k++) {
134                  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 168  Line 170 
170                          }                          }
171                  }                  }
172          }          }
173    
174            i = normalize_quantizer_field(quant, intquant,
175                                                                      mb_width * mb_height,
176                                                                      min_quant, max_quant);
177    
178          free(val);          free(val);
179          free(quant);          free(quant);
180          return normalize_quantizer_field(quant, intquant, mb_width * mb_height,  
181                                                                           min_quant, max_quant);          return(i);
182    
183  }  }

Legend:
Removed from v.443  
changed lines
  Added in v.496

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