[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.43, Fri Jun 14 13:21:35 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 221  Line 226 
226          pEnc->mbParam.fbase = pParam->fbase;          pEnc->mbParam.fbase = pParam->fbase;
227          pEnc->mbParam.fincr = pParam->fincr;          pEnc->mbParam.fincr = pParam->fincr;
228    
229            pEnc->mbParam.m_quant_type = H263_QUANT;
230    
231          pEnc->sStat.fMvPrevSigma = -1;          pEnc->sStat.fMvPrevSigma = -1;
232    
233          /* Fill rate control parameters */          /* Fill rate control parameters */
# Line 640  Line 647 
647    
648          SWAP(pEnc->current, pEnc->reference);          SWAP(pEnc->current, pEnc->reference);
649    
650          EMMS();          emms();
651    
652          if (pFrame->quant == 0)          if (pFrame->quant == 0)
653                  pEnc->current->quant = RateControlGetQ(&pEnc->rate_control, 0);                  pEnc->current->quant = RateControlGetQ(&pEnc->rate_control, 0);
# Line 673  Line 680 
680                             pEnc->mbParam.edged_width, pEnc->mbParam.height);                             pEnc->mbParam.edged_width, pEnc->mbParam.height);
681  #endif  #endif
682    
683          EMMS();          emms();
684    
685          /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
686           * Luminance masking           * Luminance masking
# Line 802  Line 809 
809                  pResult->ublks = pEnc->sStat.ublks;                  pResult->ublks = pEnc->sStat.ublks;
810          }          }
811    
812          EMMS();          emms();
813    
814  #ifdef _DEBUG  #ifdef _DEBUG
815          psnr =          psnr =
# Line 876  Line 883 
883                             pEnc->mbParam.edged_width, pEnc->mbParam.height);                             pEnc->mbParam.edged_width, pEnc->mbParam.height);
884  #endif  #endif
885    
886          EMMS();          emms();
887    
888          BitstreamInit(&bs, pFrame->bitstream, 0);          BitstreamInit(&bs, pFrame->bitstream, 0);
889    
# Line 975  Line 982 
982                  pResult->ublks = pEnc->sStat.ublks;                  pResult->ublks = pEnc->sStat.ublks;
983          }          }
984    
985          EMMS();          emms();
986    
987          if (pFrame->quant == 0) {          if (pFrame->quant == 0) {
988                  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.43

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