[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.135.2.5, Tue Mar 8 19:18:44 2011 UTC revision 1.136, Tue Dec 28 19:19:43 2010 UTC
# Line 1609  Line 1609 
1609                  memcpy((void *)((ptr_t)bs->start + pos),                  memcpy((void *)((ptr_t)bs->start + pos),
1610                             (void *)((ptr_t)pEnc->smpData[k].bs->start), len);                             (void *)((ptr_t)pEnc->smpData[k].bs->start), len);
1611    
1612                  current->length += len;                  current->length = pos += len;
                 pos += len;  
1613    
1614                  /* collect stats */                  /* collect stats */
1615                  current->sStat.iTextBits += pEnc->smpData[k].sStat->iTextBits;                  current->sStat.iTextBits += pEnc->smpData[k].sStat->iTextBits;
# Line 1917  Line 1916 
1916          if (!reference->is_edged) {          if (!reference->is_edged) {
1917                  start_timer();                  start_timer();
1918                  image_setedges(pRef, pParam->edged_width, pParam->edged_height,                  image_setedges(pRef, pParam->edged_width, pParam->edged_height,
1919                                             pParam->width, pParam->height, XVID_BS_VERSION);                                             pParam->width, pParam->height, 0);
1920                  stop_edges_timer();                  stop_edges_timer();
1921                  reference->is_edged = 1;                  reference->is_edged = 1;
1922          }          }
# Line 2130  Line 2129 
2129    
2130          if (current->sStat.kblks + current->sStat.mblks <          if (current->sStat.kblks + current->sStat.mblks <
2131                  (pParam->frame_drop_ratio * mb_width * mb_height) / 100 &&                  (pParam->frame_drop_ratio * mb_width * mb_height) / 100 &&
2132                  ( (pEnc->bframenum_head >= pEnc->bframenum_tail) || !(pEnc->mbParam.global_flags & XVID_GLOBAL_CLOSED_GOP)) &&                  ( (pEnc->bframenum_head >= pEnc->bframenum_tail) || !(pEnc->mbParam.global_flags & XVID_GLOBAL_CLOSED_GOP)) )
                 (current->coding_type == P_VOP) )  
2133          {          {
2134                  current->sStat.kblks = current->sStat.mblks = current->sStat.iTextBits = 0;                  current->sStat.kblks = current->sStat.mblks = current->sStat.iTextBits = 0;
2135                  current->sStat.ublks = mb_width * mb_height;                  current->sStat.ublks = mb_width * mb_height;
# Line 2303  Line 2301 
2301          if (!pEnc->reference->is_edged) {          if (!pEnc->reference->is_edged) {
2302                  image_setedges(f_ref, pEnc->mbParam.edged_width,                  image_setedges(f_ref, pEnc->mbParam.edged_width,
2303                                             pEnc->mbParam.edged_height, pEnc->mbParam.width,                                             pEnc->mbParam.edged_height, pEnc->mbParam.width,
2304                                             pEnc->mbParam.height, XVID_BS_VERSION);                                             pEnc->mbParam.height, 0);
2305                  pEnc->reference->is_edged = 1;                  pEnc->current->is_edged = 1;
2306          }          }
2307    
2308          if (pEnc->reference->is_interpolated != 0) {          if (pEnc->reference->is_interpolated != 0) {
# Line 2320  Line 2318 
2318          if (!pEnc->current->is_edged) {          if (!pEnc->current->is_edged) {
2319                  image_setedges(b_ref, pEnc->mbParam.edged_width,                  image_setedges(b_ref, pEnc->mbParam.edged_width,
2320                                             pEnc->mbParam.edged_height, pEnc->mbParam.width,                                             pEnc->mbParam.edged_height, pEnc->mbParam.width,
2321                                             pEnc->mbParam.height, XVID_BS_VERSION);                                             pEnc->mbParam.height, 0);
2322                  pEnc->current->is_edged = 1;                  pEnc->current->is_edged = 1;
2323          }          }
2324    
# Line 2335  Line 2333 
2333    
2334          frame->coding_type = B_VOP;          frame->coding_type = B_VOP;
2335    
2336          if ((frame->vop_flags & XVID_VOP_RD_PSNRHVSM) && (frame->vop_flags & XVID_VOP_RD_BVOP)) {          if (pEnc->current->vop_flags & XVID_VOP_RD_PSNRHVSM) {
2337                  image_block_variance(&frame->image, pEnc->mbParam.edged_width, frame->mbs,                  image_block_variance(&pEnc->current->image, pEnc->mbParam.edged_width, pEnc->current->mbs,
2338                                       pEnc->mbParam.mb_width, pEnc->mbParam.mb_height);                                       pEnc->mbParam.mb_width, pEnc->mbParam.mb_height);
2339          }          }
2340    

Legend:
Removed from v.1.135.2.5  
changed lines
  Added in v.1.136

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