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

Diff of /xvidcore/src/encoder.c

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

revision 1.95.2.55, Thu Nov 20 12:07:19 2003 UTC revision 1.95.2.56, Sun Nov 30 16:13:15 2003 UTC
# Line 250  Line 250 
250          if (pEnc->current->mbs == NULL || pEnc->reference->mbs == NULL)          if (pEnc->current->mbs == NULL || pEnc->reference->mbs == NULL)
251                  goto xvid_err_memory2;                  goto xvid_err_memory2;
252    
253            /* allocate quant matrix memory */
254    
255            pEnc->mbParam.mpeg_quant_matrices =
256                    xvid_malloc(sizeof(uint16_t) * 64 * 8, CACHE_LINE);
257    
258            if (pEnc->mbParam.mpeg_quant_matrices == NULL)
259                    goto xvid_err_memory2a;
260    
261          /* allocate interpolation image memory */          /* allocate interpolation image memory */
262    
263          if ((pEnc->mbParam.plugin_flags & XVID_REQORIGINAL)) {          if ((pEnc->mbParam.plugin_flags & XVID_REQORIGINAL)) {
# Line 403  Line 411 
411          create->handle = (void *) pEnc;          create->handle = (void *) pEnc;
412    
413          init_timer();          init_timer();
414            init_mpeg_matrix(pEnc->mbParam.mpeg_quant_matrices);
415    
416          return 0;   /* ok */          return 0;   /* ok */
417    
# Line 469  Line 478 
478          image_destroy(&pEnc->vGMC, pEnc->mbParam.edged_width,          image_destroy(&pEnc->vGMC, pEnc->mbParam.edged_width,
479                                    pEnc->mbParam.edged_height);                                    pEnc->mbParam.edged_height);
480    
481      xvid_err_memory2a:
482            xvid_free(pEnc->mbParam.mpeg_quant_matrices);
483    
484    xvid_err_memory2:    xvid_err_memory2:
485          xvid_free(pEnc->current->mbs);          xvid_free(pEnc->current->mbs);
# Line 597  Line 608 
608                  xvid_free(pEnc->plugins);                  xvid_free(pEnc->plugins);
609          }          }
610    
611            xvid_free(pEnc->mbParam.mpeg_quant_matrices);
612    
613          if (pEnc->num_plugins>0)          if (pEnc->num_plugins>0)
614                  xvid_free(pEnc->zones);                  xvid_free(pEnc->zones);
615    
# Line 1227  Line 1240 
1240    
1241                  if ((pEnc->mbParam.vol_flags & XVID_VOL_MPEGQUANT)) {                  if ((pEnc->mbParam.vol_flags & XVID_VOL_MPEGQUANT)) {
1242                          if (frame->quant_intra_matrix != NULL)                          if (frame->quant_intra_matrix != NULL)
1243                                  set_intra_matrix(frame->quant_intra_matrix);                                  set_intra_matrix(pEnc->mbParam.mpeg_quant_matrices, frame->quant_intra_matrix);
1244                          if (frame->quant_inter_matrix != NULL)                          if (frame->quant_inter_matrix != NULL)
1245                                  set_inter_matrix(frame->quant_inter_matrix);                                  set_inter_matrix(pEnc->mbParam.mpeg_quant_matrices, frame->quant_inter_matrix);
1246                  }                  }
1247    
1248                  /* prevent vol/vop misuse */                  /* prevent vol/vop misuse */

Legend:
Removed from v.1.95.2.55  
changed lines
  Added in v.1.95.2.56

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