[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.41, Wed Jun 12 20:38:40 2002 UTC revision 1.42, Thu Jun 13 11:42:15 2002 UTC
# Line 43  Line 43 
43  #include <stdlib.h>  #include <stdlib.h>
44  #include <stdio.h>  #include <stdio.h>
45  #include <math.h>  #include <math.h>
46    #include <string.h>
47    
48  #include "encoder.h"  #include "encoder.h"
49  #include "prediction/mbprediction.h"  #include "prediction/mbprediction.h"
# Line 207  Line 208 
208          if (pEnc == NULL)          if (pEnc == NULL)
209                  return XVID_ERR_MEMORY;                  return XVID_ERR_MEMORY;
210    
211            /* Zero the Encoder Structure */
212    
213            memset(pEnc, 0, sizeof(Encoder));
214    
215          /* Fill members of Encoder structure */          /* Fill members of Encoder structure */
216    
217          pEnc->mbParam.width = pParam->width;          pEnc->mbParam.width = pParam->width;
# Line 640  Line 645 
645    
646          SWAP(pEnc->current, pEnc->reference);          SWAP(pEnc->current, pEnc->reference);
647    
648          EMMS();          emms();
649    
650          if (pFrame->quant == 0)          if (pFrame->quant == 0)
651                  pEnc->current->quant = RateControlGetQ(&pEnc->rate_control, 0);                  pEnc->current->quant = RateControlGetQ(&pEnc->rate_control, 0);
# Line 673  Line 678 
678                             pEnc->mbParam.edged_width, pEnc->mbParam.height);                             pEnc->mbParam.edged_width, pEnc->mbParam.height);
679  #endif  #endif
680    
681          EMMS();          emms();
682    
683          /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
684           * Luminance masking           * Luminance masking
# Line 802  Line 807 
807                  pResult->ublks = pEnc->sStat.ublks;                  pResult->ublks = pEnc->sStat.ublks;
808          }          }
809    
810          EMMS();          emms();
811    
812  #ifdef _DEBUG  #ifdef _DEBUG
813          psnr =          psnr =
# Line 876  Line 881 
881                             pEnc->mbParam.edged_width, pEnc->mbParam.height);                             pEnc->mbParam.edged_width, pEnc->mbParam.height);
882  #endif  #endif
883    
884          EMMS();          emms();
885    
886          BitstreamInit(&bs, pFrame->bitstream, 0);          BitstreamInit(&bs, pFrame->bitstream, 0);
887    
# Line 975  Line 980 
980                  pResult->ublks = pEnc->sStat.ublks;                  pResult->ublks = pEnc->sStat.ublks;
981          }          }
982    
983          EMMS();          emms();
984    
985          if (pFrame->quant == 0) {          if (pFrame->quant == 0) {
986                  RateControlUpdate(&pEnc->rate_control, pEnc->current->quant,                  RateControlUpdate(&pEnc->rate_control, pEnc->current->quant,

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.42

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