[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.48, Mon Jun 24 09:53:17 2002 UTC revision 1.51, Sun Jun 30 10:46:29 2002 UTC
# Line 625  Line 625 
625  {  {
626          if (pEnc->queue_size >= pEnc->mbParam.max_bframes)          if (pEnc->queue_size >= pEnc->mbParam.max_bframes)
627          {          {
628                  DPRINTF("FATAL: QUEUE FULL");                  DPRINTF(DPRINTF_DEBUG,"FATAL: QUEUE FULL");
629                  return;                  return;
630          }          }
631    
632          DPRINTF("*** QUEUE bf: head=%i tail=%i   queue: head=%i tail=%i size=%i",          DPRINTF(DPRINTF_DEBUG,"*** QUEUE bf: head=%i tail=%i   queue: head=%i tail=%i size=%i",
633                                  pEnc->bframenum_head, pEnc->bframenum_tail,                                  pEnc->bframenum_head, pEnc->bframenum_tail,
634                                  pEnc->queue_head, pEnc->queue_tail, pEnc->queue_size);                                  pEnc->queue_head, pEnc->queue_tail, pEnc->queue_size);
635    
# Line 697  Line 697 
697                           * frame as a pframe                           * frame as a pframe
698                           */                           */
699    
700                          DPRINTF("*** BFRAME (final frame) bf: head=%i tail=%i   queue: head=%i tail=%i size=%i",                          DPRINTF(DPRINTF_DEBUG,"*** BFRAME (final frame) bf: head=%i tail=%i   queue: head=%i tail=%i size=%i",
701                                  pEnc->bframenum_head, pEnc->bframenum_tail,                                  pEnc->bframenum_head, pEnc->bframenum_tail,
702                                  pEnc->queue_head, pEnc->queue_tail, pEnc->queue_size);                                  pEnc->queue_head, pEnc->queue_tail, pEnc->queue_size);
703    
# Line 716  Line 716 
716                  }                  }
717    
718    
719                  DPRINTF("*** BFRAME (flush) bf: head=%i tail=%i   queue: head=%i tail=%i size=%i",                  DPRINTF(DPRINTF_DEBUG,"*** BFRAME (flush) bf: head=%i tail=%i   queue: head=%i tail=%i size=%i",
720                                  pEnc->bframenum_head, pEnc->bframenum_tail,                                  pEnc->bframenum_head, pEnc->bframenum_tail,
721                                  pEnc->queue_head, pEnc->queue_tail, pEnc->queue_size);                                  pEnc->queue_head, pEnc->queue_tail, pEnc->queue_size);
722    
# Line 738  Line 738 
738    
739                  if ((pEnc->global & XVID_GLOBAL_PACKED)) {                  if ((pEnc->global & XVID_GLOBAL_PACKED)) {
740    
741                          DPRINTF("*** EMPTY bf: head=%i tail=%i   queue: head=%i tail=%i size=%i",                          DPRINTF(DPRINTF_DEBUG,"*** EMPTY bf: head=%i tail=%i   queue: head=%i tail=%i size=%i",
742                                  pEnc->bframenum_head, pEnc->bframenum_tail,                                  pEnc->bframenum_head, pEnc->bframenum_tail,
743                                  pEnc->queue_head, pEnc->queue_tail, pEnc->queue_size);                                  pEnc->queue_head, pEnc->queue_tail, pEnc->queue_size);
744    
   
745                          BitstreamWriteVopHeader(&bs, &pEnc->mbParam, pEnc->current, 0);                          BitstreamWriteVopHeader(&bs, &pEnc->mbParam, pEnc->current, 0);
746                          BitstreamPad(&bs);                          BitstreamPad(&bs);
747                          BitstreamPutBits(&bs, 0x7f, 8);                          BitstreamPutBits(&bs, 0x7f, 8);
# Line 809  Line 808 
808    
809          } else if (BitstreamPos(&bs) == 0) {          } else if (BitstreamPos(&bs) == 0) {
810    
811                  DPRINTF("*** SKIP bf: head=%i tail=%i   queue: head=%i tail=%i size=%i",                  DPRINTF(DPRINTF_DEBUG,"*** SKIP bf: head=%i tail=%i   queue: head=%i tail=%i size=%i",
812                                  pEnc->bframenum_head, pEnc->bframenum_tail,                                  pEnc->bframenum_head, pEnc->bframenum_tail,
813                                  pEnc->queue_head, pEnc->queue_tail, pEnc->queue_size);                                  pEnc->queue_head, pEnc->queue_tail, pEnc->queue_size);
814    
   
815                  pFrame->intra = 0;                  pFrame->intra = 0;
816    
817                  BitstreamPutBits(&bs, 0x7f, 8);                  BitstreamPutBits(&bs, 0x7f, 8);
# Line 916  Line 914 
914           * %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */           * %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
915    
916    
917          if (pEnc->iFrameNum == 0 || pFrame->intra == 1 || pEnc->bframenum_dx50bvop != -1 ||          if (pEnc->iFrameNum == 0 || pFrame->intra == 1 || pEnc->bframenum_dx50bvop >= 0 ||
918                  (pFrame->intra < 0 && pEnc->iMaxKeyInterval > 0 &&                  (pFrame->intra < 0 && pEnc->iMaxKeyInterval > 0 &&
919                   pEnc->iFrameNum >= pEnc->iMaxKeyInterval)                   pEnc->iFrameNum >= pEnc->iMaxKeyInterval)
920                  || image_mad(&pEnc->reference->image, &pEnc->current->image,                  || image_mad(&pEnc->reference->image, &pEnc->current->image,
# Line 926  Line 924 
924                   * This will be coded as an Intra Frame                   * This will be coded as an Intra Frame
925                   */                   */
926    
927                  DPRINTF("*** IFRAME bf: head=%i tail=%i   queue: head=%i tail=%i size=%i",                  DPRINTF(DPRINTF_DEBUG,"*** IFRAME bf: head=%i tail=%i   queue: head=%i tail=%i size=%i",
928                                  pEnc->bframenum_head, pEnc->bframenum_tail,                                  pEnc->bframenum_head, pEnc->bframenum_tail,
929                                  pEnc->queue_head, pEnc->queue_tail, pEnc->queue_size);                                  pEnc->queue_head, pEnc->queue_tail, pEnc->queue_size);
930    
# Line 950  Line 948 
948                          pFrame->intra = 0;                          pFrame->intra = 0;
949    
950                  } else {                  } else {
951                          pEnc->bframenum_dx50bvop = -1;  
952                          FrameCodeI(pEnc, &bs, &bits);                          FrameCodeI(pEnc, &bs, &bits);
953                          pFrame->intra = 1;                          pFrame->intra = 1;
954    
955                            pEnc->bframenum_dx50bvop = -1;
956                  }                  }
957    
958                  pEnc->flush_bframes = 1;                  pEnc->flush_bframes = 1;
959    
960                  if ((pEnc->global & XVID_GLOBAL_PACKED)) {                  if ((pEnc->global & XVID_GLOBAL_PACKED) && pEnc->bframenum_tail > 0) {
961                          BitstreamPad(&bs);                          BitstreamPad(&bs);
962                          input_valid = 0;                          input_valid = 0;
963                          goto ipvop_loop;                          goto ipvop_loop;
# Line 972  Line 972 
972                   * This will be coded as a Predicted Frame                   * This will be coded as a Predicted Frame
973                   */                   */
974    
975                  DPRINTF("*** PFRAME bf: head=%i tail=%i   queue: head=%i tail=%i size=%i",                  DPRINTF(DPRINTF_DEBUG,"*** PFRAME bf: head=%i tail=%i   queue: head=%i tail=%i size=%i",
976                                  pEnc->bframenum_head, pEnc->bframenum_tail,                                  pEnc->bframenum_head, pEnc->bframenum_tail,
977                                  pEnc->queue_head, pEnc->queue_tail, pEnc->queue_size);                                  pEnc->queue_head, pEnc->queue_tail, pEnc->queue_size);
978    
# Line 995  Line 995 
995                   * This will be coded as a Bidirectional Frame                   * This will be coded as a Bidirectional Frame
996                   */                   */
997    
998                  DPRINTF("*** BFRAME (store) bf: head=%i tail=%i   queue: head=%i tail=%i size=%i",                  DPRINTF(DPRINTF_DEBUG,"*** BFRAME (store) bf: head=%i tail=%i   queue: head=%i tail=%i size=%i",
999                                  pEnc->bframenum_head, pEnc->bframenum_tail,                                  pEnc->bframenum_head, pEnc->bframenum_tail,
1000                                  pEnc->queue_head, pEnc->queue_tail, pEnc->queue_size);                                  pEnc->queue_head, pEnc->queue_tail, pEnc->queue_size);
1001    

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.51

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