[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.67, Tue Jul 30 12:14:37 2002 UTC revision 1.70, Sun Aug 4 21:32:56 2002 UTC
# Line 623  Line 623 
623  #ifdef BFRAMES  #ifdef BFRAMES
624  void inc_frame_num(Encoder * pEnc)  void inc_frame_num(Encoder * pEnc)
625  {  {
         pEnc->iFrameNum++;  
626          pEnc->mbParam.m_ticks += pEnc->mbParam.fincr;          pEnc->mbParam.m_ticks += pEnc->mbParam.fincr;
627    
628          pEnc->mbParam.m_seconds = pEnc->mbParam.m_ticks / pEnc->mbParam.fbase;          pEnc->mbParam.m_seconds = pEnc->mbParam.m_ticks / pEnc->mbParam.fbase;
# Line 1044  Line 1043 
1043                  goto bvop_loop;                  goto bvop_loop;
1044          }          }
1045    
1046            pEnc->iFrameNum++;
1047    
1048          BitstreamPad(&bs);          BitstreamPad(&bs);
1049          pFrame->length = BitstreamLength(&bs);          pFrame->length = BitstreamLength(&bs);
1050    
# Line 1251  Line 1252 
1252          DEBUG(temp);          DEBUG(temp);
1253  #endif  #endif
1254    
 #ifdef BFRAMES  
1255          inc_frame_num(pEnc);          inc_frame_num(pEnc);
 #else  
1256          pEnc->iFrameNum++;          pEnc->iFrameNum++;
 #endif  
   
1257    
1258          stop_global_timer();          stop_global_timer();
1259          write_timer();          write_timer();
# Line 1536  Line 1533 
1533                          stop_prediction_timer();                          stop_prediction_timer();
1534    
1535                          start_timer();                          start_timer();
1536                            if (pEnc->current->global_flags & XVID_GREYSCALE)
1537                            {       pMB->cbp &= 0x3C;               /* keep only bits 5-2 */
1538                                    qcoeff[4*64+0]=0;               /* zero, because for INTRA MBs DC value is saved */
1539                                    qcoeff[5*64+0]=0;
1540                            }
1541                          MBCoding(pEnc->current, pMB, qcoeff, bs, &pEnc->sStat);                          MBCoding(pEnc->current, pMB, qcoeff, bs, &pEnc->sStat);
1542                          stop_coding_timer();                          stop_coding_timer();
1543                  }                  }
# Line 1572  Line 1574 
1574          DECLARE_ALIGNED_MATRIX(qcoeff, 6, 64, int16_t, CACHE_LINE);          DECLARE_ALIGNED_MATRIX(qcoeff, 6, 64, int16_t, CACHE_LINE);
1575    
1576          int iLimit;          int iLimit;
1577          int k;          int x, y, k;
         int x, y;  
1578          int iSearchRange;          int iSearchRange;
1579          int bIntra;          int bIntra;
1580    
# Line 1725  Line 1726 
1726                                  }                                  }
1727                                  if (!bSkip)                                  if (!bSkip)
1728                                  {                                  {
1729                                            if (pEnc->current->global_flags & XVID_GREYSCALE)
1730                                            {       pMB->cbp &= 0x3C;               /* keep only bits 5-2 */
1731                                                    qcoeff[4*64+0]=0;               /* zero, because DC for INTRA MBs DC value is saved */
1732                                                    qcoeff[5*64+0]=0;
1733                                            }
1734                                          MBCoding(pEnc->current, pMB, qcoeff, bs, &pEnc->sStat);                                          MBCoding(pEnc->current, pMB, qcoeff, bs, &pEnc->sStat);
1735                                          pMB->cbp = 0x80;                /* trick! so cbp!=0, but still nothing is written to bs */                                          pMB->cbp = 0x80;                /* trick! so cbp!=0, but still nothing is written to bs */
1736                                  }                                  }
1737                                  else                                  else
1738                                          MBSkip(bs);                                          MBSkip(bs);
1739    
   
1740  #else  #else
1741                                          MBSkip(bs);     /* without B-frames, no precautions are needed */                                          MBSkip(bs);     /* without B-frames, no precautions are needed */
1742    
1743  #endif  #endif
1744    
1745                          } else {                          } else {
1746                                    if (pEnc->current->global_flags & XVID_GREYSCALE)
1747                                    {       pMB->cbp &= 0x3C;               /* keep only bits 5-2 */
1748                                            qcoeff[4*64+0]=0;               /* zero, because DC for INTRA MBs DC value is saved */
1749                                            qcoeff[5*64+0]=0;
1750                                    }
1751                                  MBCoding(pEnc->current, pMB, qcoeff, bs, &pEnc->sStat);                                  MBCoding(pEnc->current, pMB, qcoeff, bs, &pEnc->sStat);
1752                          }                          }
1753    

Legend:
Removed from v.1.67  
changed lines
  Added in v.1.70

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