[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.76.2.38, Mon Jan 13 23:52:50 2003 UTC revision 1.76.2.40, Tue Jan 21 22:05:44 2003 UTC
# Line 229  Line 229 
229    
230          pEnc->bitrate = pParam->rc_bitrate;          pEnc->bitrate = pParam->rc_bitrate;
231    
232          pEnc->iFrameNum = 0;          pEnc->iFrameNum = -1;
233          pEnc->mbParam.iMaxKeyInterval = pParam->max_key_interval;          pEnc->mbParam.iMaxKeyInterval = pParam->max_key_interval;
234    
235          /* try to allocate frame memory */          /* try to allocate frame memory */
# Line 661  Line 661 
661          if (intra < 0)  return -1;          if (intra < 0)  return -1;
662          if (intra == 1) return I_VOP;          if (intra == 1) return I_VOP;
663          if (intra == 2) return B_VOP;          if (intra == 2) return B_VOP;
         if (intra == 3) return S_VOP;  
664    
665          return P_VOP;          return P_VOP;
666  }  }
# Line 733  Line 732 
732    
733                          BitstreamPadAlways(&bs);                          BitstreamPadAlways(&bs);
734                          pFrame->length = BitstreamLength(&bs);                          pFrame->length = BitstreamLength(&bs);
                         if(pEnc->current->coding_type == P_VOP)  
735                                  pFrame->intra = 0;                                  pFrame->intra = 0;
736                          else  
                                 pFrame->intra = 3;  
737    
738                          emms();                          emms();
739    
# Line 1063  Line 1060 
1060                          }                          }
1061                          FrameCodeP(pEnc, &bs, &bits, 1, 0);                          FrameCodeP(pEnc, &bs, &bits, 1, 0);
1062                          bframes_count = 0;                          bframes_count = 0;
   
                         if(pEnc->current->coding_type == P_VOP)  
1063                                  pFrame->intra = 0;                                  pFrame->intra = 0;
                         else  
                                 pFrame->intra = 3;  
   
1064    
1065                  } else {                  } else {
1066    
# Line 1106  Line 1098 
1098    
1099                  FrameCodeP(pEnc, &bs, &bits, 1, 0);                  FrameCodeP(pEnc, &bs, &bits, 1, 0);
1100                  bframes_count = 0;                  bframes_count = 0;
                 if(pEnc->current->coding_type == P_VOP)  
1101                          pFrame->intra = 0;                          pFrame->intra = 0;
                 else  
                         pFrame->intra = 3;  
1102                  pEnc->flush_bframes = 1;                  pEnc->flush_bframes = 1;
1103    
1104                  if ((pEnc->mbParam.global & XVID_GLOBAL_PACKED) && (pEnc->bframenum_tail > 0)) {                  if ((pEnc->mbParam.global & XVID_GLOBAL_PACKED) && (pEnc->bframenum_tail > 0)) {
# Line 1835  Line 1824 
1824                                          pEnc->vGMC.y + 16*y*pEnc->mbParam.edged_width + 16*x,                                          pEnc->vGMC.y + 16*y*pEnc->mbParam.edged_width + 16*x,
1825                                          pEnc->mbParam.edged_width, 65536);                                          pEnc->mbParam.edged_width, 65536);
1826    
1827                                    if (pEnc->current->motion_flags & PMV_CHROMA16) {
1828                                            iSAD += sad8(pEnc->current->image.u + 8*y*(pEnc->mbParam.edged_width/2) + 8*x,
1829                                            pEnc->vGMC.u + 8*y*(pEnc->mbParam.edged_width/2) + 8*x, pEnc->mbParam.edged_width/2);
1830    
1831                                            iSAD += sad8(pEnc->current->image.v + 8*y*(pEnc->mbParam.edged_width/2) + 8*x,
1832                                            pEnc->vGMC.v + 8*y*(pEnc->mbParam.edged_width/2) + 8*x, pEnc->mbParam.edged_width/2);
1833                                    }
1834    
1835                                  if (iSAD <= pMB->sad16) {               /* mode decision GMC */                                  if (iSAD <= pMB->sad16) {               /* mode decision GMC */
1836    
1837                                          if (pEnc->mbParam.m_quarterpel)                                          if (pEnc->mbParam.m_quarterpel)

Legend:
Removed from v.1.76.2.38  
changed lines
  Added in v.1.76.2.40

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