[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 252, Sun Jun 30 10:46:29 2002 UTC revision 338, Wed Jul 24 23:07:45 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) {
416                  if (pMB->cbp == 0 && pMB->mode == MODE_INTER && pMB->mvs[0].x == 0 &&                  if (pMB->cbp == 0 && pMB->mode == MODE_INTER && pMB->mvs[0].x == 0 &&
417                          pMB->mvs[0].y == 0) {                          pMB->mvs[0].y == 0) {
418    
419    #ifdef _DISABLE_SKIP
420    /* disable SKIP when Bframes active until some workaround for the B-SKIP problem is found */
421                            BitstreamPutBit(bs, 0); // always coded!
422    #else
423                          BitstreamPutBit(bs, 1); // not_coded                          BitstreamPutBit(bs, 1); // not_coded
424    
425                          return;                          return;
426    #endif
427                  } else                  } else
428                          BitstreamPutBit(bs, 0); // coded                          BitstreamPutBit(bs, 0); // coded
429          }          }
430    
431          if (intra)          if (pMB->mode == MODE_INTRA || pMB->mode == MODE_INTRA_Q)
432                  CodeBlockIntra(frame, pMB, qcoeff, bs, pStat);                  CodeBlockIntra(frame, pMB, qcoeff, bs, pStat);
433          else          else
434                  CodeBlockInter(frame, pMB, qcoeff, bs, pStat);                  CodeBlockInter(frame, pMB, qcoeff, bs, pStat);
# Line 518  Line 523 
523          int i;          int i;
524    
525  /*      ------------------------------------------------------------------  /*      ------------------------------------------------------------------
526                  when a block is skipped it is decoded DIRECT(0,)                  when a block is skipped it is decoded DIRECT(0,0)
527                  hence are interpolated from forward & backward frames                  hence is interpolated from forward & backward frames
528          ------------------------------------------------------------------ */          ------------------------------------------------------------------ */
529    
530          if (mb->mode == 5) {          if (mb->mode == MODE_DIRECT_NONE_MV) {
531                  BitstreamPutBit(bs, 1); // skipped                  BitstreamPutBit(bs, 1); // skipped
532                  return;                  return;
533          }          }
# Line 556  Line 561 
561          }          }
562    
563          if (mb->mode == MODE_DIRECT) {          if (mb->mode == MODE_DIRECT) {
564                  // TODO: direct                  CodeVector(bs, mb->deltamv.x, 1, pStat);                /* fcode is always 1 for delta vector */
565                    CodeVector(bs, mb->deltamv.y, 1, pStat);                /* prediction is always (0,0) */
566          }          }
567    
568          for (i = 0; i < 6; i++) {          for (i = 0; i < 6; i++) {

Legend:
Removed from v.252  
changed lines
  Added in v.338

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