[svn] / trunk / xvidcore / src / bitstream / mbcoding.c Repository:
ViewVC logotype

Diff of /trunk/xvidcore/src/bitstream/mbcoding.c

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

revision 313, Thu Jul 18 23:52:40 2002 UTC revision 347, Sun Jul 28 13:06:46 2002 UTC
# Line 412  Line 412 
412                   Statistics * pStat)                   Statistics * pStat)
413  {  {
414    
         int intra = (pMB->mode == MODE_INTRA || pMB->mode == MODE_INTRA_Q);  
   
415          if (frame->coding_type == P_VOP) {          if (frame->coding_type == P_VOP) {
                 if (pMB->cbp == 0 && pMB->mode == MODE_INTER && pMB->mvs[0].x == 0 &&  
                         pMB->mvs[0].y == 0) {  
                         BitstreamPutBit(bs, 1); // not_coded  
                         return;  
                 } else  
416                          BitstreamPutBit(bs, 0); // coded                          BitstreamPutBit(bs, 0); // coded
417          }          }
418    
419          if (intra)          if (pMB->mode == MODE_INTRA || pMB->mode == MODE_INTRA_Q)
420                  CodeBlockIntra(frame, pMB, qcoeff, bs, pStat);                  CodeBlockIntra(frame, pMB, qcoeff, bs, pStat);
421          else          else
422                  CodeBlockInter(frame, pMB, qcoeff, bs, pStat);                  CodeBlockInter(frame, pMB, qcoeff, bs, pStat);
423    
424  }  }
425    
426    
427    void
428    MBSkip(Bitstream * bs)
429    {
430            BitstreamPutBit(bs, 1); // not coded
431            return;
432    }
433    
434    
435  /***************************************************************  /***************************************************************
436   * bframe encoding start   * bframe encoding start
437   ***************************************************************/   ***************************************************************/
# Line 556  Line 558 
558          }          }
559    
560          if (mb->mode == MODE_DIRECT) {          if (mb->mode == MODE_DIRECT) {
561                  CodeVector(bs, mb->mvs[0].x, 1, pStat);         /* fcode is always 1 for delta vector */                  CodeVector(bs, mb->deltamv.x, 1, pStat);                /* fcode is always 1 for delta vector */
562                  CodeVector(bs, mb->mvs[0].y, 1, pStat);         /* prediction is always (0,0) */                  CodeVector(bs, mb->deltamv.y, 1, pStat);                /* prediction is always (0,0) */
563          }          }
564    
565          for (i = 0; i < 6; i++) {          for (i = 0; i < 6; i++) {

Legend:
Removed from v.313  
changed lines
  Added in v.347

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