[svn] / branches / dev-api-3 / xvidcore / src / encoder.c Repository:
ViewVC logotype

Diff of /branches/dev-api-3/xvidcore/src/encoder.c

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

revision 621, Sat Nov 2 16:12:27 2002 UTC revision 631, Thu Nov 7 10:31:03 2002 UTC
# Line 39  Line 39 
39   *             MinChen <chenm001@163.com>   *             MinChen <chenm001@163.com>
40   *  14.04.2002 added FrameCodeB()   *  14.04.2002 added FrameCodeB()
41   *   *
42   *  $Id: encoder.c,v 1.76.2.15 2002-11-02 16:12:27 chl Exp $   *  $Id: encoder.c,v 1.76.2.16 2002-11-07 10:28:15 suxen_drol Exp $
43   *   *
44   ****************************************************************************/   ****************************************************************************/
45    
# Line 107  Line 107 
107  };  };
108    
109    
 static void __inline  
 image_null(IMAGE * image)  
 {  
         image->y = image->u = image->v = NULL;  
 }  
   
   
110  /*****************************************************************************  /*****************************************************************************
111   * Encoder creation   * Encoder creation
112   *   *
# Line 623  Line 616 
616          start_timer();          start_timer();
617          if (image_input          if (image_input
618                  (&pEnc->queue[pEnc->queue_tail], pEnc->mbParam.width, pEnc->mbParam.height,                  (&pEnc->queue[pEnc->queue_tail], pEnc->mbParam.width, pEnc->mbParam.height,
619                   pEnc->mbParam.edged_width, pFrame->image, pFrame->colorspace))                   pEnc->mbParam.edged_width, pFrame->image, pFrame->stride, pFrame->colorspace, pFrame->general & XVID_INTERLACING))
620                  return;                  return;
621          stop_conv_timer();          stop_conv_timer();
622    
# Line 718  Line 711 
711                          pFrame->length = BitstreamLength(&bs);                          pFrame->length = BitstreamLength(&bs);
712                          pFrame->intra = 0;                          pFrame->intra = 0;
713    
714                            emms();
715    
716                          return XVID_ERR_OK;                          return XVID_ERR_OK;
717                  }                  }
718    
# Line 736  Line 731 
731                  if (input_valid)                  if (input_valid)
732                          queue_image(pEnc, pFrame);                          queue_image(pEnc, pFrame);
733    
734                    emms();
735    
736                  return XVID_ERR_OK;                  return XVID_ERR_OK;
737          }          }
738    
# Line 769  Line 766 
766                          if (input_valid)                          if (input_valid)
767                                  queue_image(pEnc, pFrame);                                  queue_image(pEnc, pFrame);
768    
769                            emms();
770    
771                          return XVID_ERR_OK;                          return XVID_ERR_OK;
772                  }                  }
773          }          }
# Line 799  Line 798 
798                  start_timer();                  start_timer();
799                  if (image_input                  if (image_input
800                          (&pEnc->current->image, pEnc->mbParam.width, pEnc->mbParam.height,                          (&pEnc->current->image, pEnc->mbParam.width, pEnc->mbParam.height,
801                          pEnc->mbParam.edged_width, pFrame->image, pFrame->colorspace))                          pEnc->mbParam.edged_width, pFrame->image, pFrame->stride, pFrame->colorspace, pFrame->general & XVID_INTERLACING))
802                    {
803                            emms();
804                          return XVID_ERR_FORMAT;                          return XVID_ERR_FORMAT;
805                    }
806                  stop_conv_timer();                  stop_conv_timer();
807    
808                  // queue input frame, and dequue next image                  // queue input frame, and dequue next image
# Line 839  Line 841 
841                  }                  }
842    
843                  pFrame->length = BitstreamLength(&bs);                  pFrame->length = BitstreamLength(&bs);
844                    emms();
845                  return XVID_ERR_OK;                  return XVID_ERR_OK;
846          }          }
847    
# Line 1076  Line 1079 
1079          stop_global_timer();          stop_global_timer();
1080          write_timer();          write_timer();
1081    
1082            emms();
1083          return XVID_ERR_OK;          return XVID_ERR_OK;
1084  }  }
1085    
# Line 1130  Line 1134 
1134          start_timer();          start_timer();
1135          if (image_input          if (image_input
1136                  (&pEnc->current->image, pEnc->mbParam.width, pEnc->mbParam.height,                  (&pEnc->current->image, pEnc->mbParam.width, pEnc->mbParam.height,
1137                   pEnc->mbParam.edged_width, pFrame->image, pFrame->colorspace) < 0)                   pEnc->mbParam.edged_width, pFrame->image, pFrame->stride, pFrame->colorspace, pFrame->general & XVID_INTERLACING) < 0)
1138                  return XVID_ERR_FORMAT;                  return XVID_ERR_FORMAT;
1139          stop_conv_timer();          stop_conv_timer();
1140    
# Line 1621  Line 1625 
1625    
1626          if (pEnc->current->global_flags & XVID_GMC) {          if (pEnc->current->global_flags & XVID_GMC) {
1627  //              printf("Global Motion = %d %d quarterpel=%d\n", pEnc->current->GMC_MV.x, pEnc->current->GMC_MV.y,pEnc->current->quarterpel);  //              printf("Global Motion = %d %d quarterpel=%d\n", pEnc->current->GMC_MV.x, pEnc->current->GMC_MV.y,pEnc->current->quarterpel);
1628                    DPRINTF(DPRINTF_HEADER, "Global Motion = %d %d quarterpel=%d\n", pEnc->current->GMC_MV.x, pEnc->current->GMC_MV.y,pEnc->current->quarterpel);
1629                  pEnc->current->coding_type = S_VOP;                  pEnc->current->coding_type = S_VOP;
1630          } else          } else
1631                  pEnc->current->coding_type = P_VOP;                  pEnc->current->coding_type = P_VOP;

Legend:
Removed from v.621  
changed lines
  Added in v.631

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