[svn] / branches / dev-api-4 / xvidcore / src / plugins / plugin_2pass2.c Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/src/plugins/plugin_2pass2.c

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

revision 1052, Mon Jun 2 11:47:30 2003 UTC revision 1053, Mon Jun 9 01:25:19 2003 UTC
# Line 25  Line 25 
25   * along with this program; if not, write to the Free Software   * along with this program; if not, write to the Free Software
26   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
27   *   *
28   * $Id: plugin_2pass2.c,v 1.1.2.18 2003-05-29 14:18:18 edgomez Exp $   * $Id: plugin_2pass2.c,v 1.1.2.19 2003-06-09 01:22:58 edgomez Exp $
29   *   *
30   *****************************************************************************/   *****************************************************************************/
31    
# Line 600  Line 600 
600          rc->overflow += rc->KFoverflow;          rc->overflow += rc->KFoverflow;
601          rc->KFoverflow = s->desired_length - data->length;          rc->KFoverflow = s->desired_length - data->length;
602    
603          if (kfdiff > 1) {  // non-consecutive keyframes          if (kfdiff > 1) {  /* non-consecutive keyframes */
604              rc->KFoverflow_partial = rc->KFoverflow / (kfdiff - 1);              rc->KFoverflow_partial = rc->KFoverflow / (kfdiff - 1);
605          }else{ // consecutive keyframes          }else{ /* consecutive keyframes */
606                          rc->overflow += rc->KFoverflow;                          rc->overflow += rc->KFoverflow;
607                          rc->KFoverflow = 0;                          rc->KFoverflow = 0;
608                          rc->KFoverflow_partial = 0;                          rc->KFoverflow_partial = 0;
609          }          }
610          rc->KF_idx++;          rc->KF_idx++;
611      } else {      } else {
612          // distribute part of the keyframe overflow          /* distribute part of the keyframe overflow */
613          rc->overflow += s->desired_length - data->length + rc->KFoverflow_partial;          rc->overflow += s->desired_length - data->length + rc->KFoverflow_partial;
614          rc->KFoverflow -= rc->KFoverflow_partial;          rc->KFoverflow -= rc->KFoverflow_partial;
615      }      }
# Line 826  Line 826 
826              next -= create->zones[i].frame;              next -= create->zones[i].frame;
827              rc->avg_weight += (double)(next * create->zones[i].increment) / (double)create->zones[i].base;              rc->avg_weight += (double)(next * create->zones[i].increment) / (double)create->zones[i].base;
828              n += next;              n += next;
829          }else{  // XVID_ZONE_QUANT          }else{  /* XVID_ZONE_QUANT */
830              for (j = create->zones[i].frame; j < next && j < rc->num_frames; j++ ) {              for (j = create->zones[i].frame; j < next && j < rc->num_frames; j++ ) {
831                  rc->stats[j].zone_mode = XVID_ZONE_QUANT;                  rc->stats[j].zone_mode = XVID_ZONE_QUANT;
832                  rc->stats[j].weight = (double)create->zones[i].increment / (double)create->zones[i].base;                  rc->stats[j].weight = (double)create->zones[i].increment / (double)create->zones[i].base;

Legend:
Removed from v.1052  
changed lines
  Added in v.1053

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