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

Diff of /branches/dev-api-4/xvidcore/vfw/src/codec.c

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

revision 1234, Mon Dec 1 13:16:43 2003 UTC revision 1277, Thu Dec 18 14:51:40 2003 UTC
# Line 285  Line 285 
285                           * builds and that activates lot of other debug printfs. We only                           * builds and that activates lot of other debug printfs. We only
286                           * want these all the time */                           * want these all the time */
287                          char buf[1024];                          char buf[1024];
288                          sprintf(buf, "[%5i]   type=%c   Q:%2i   length:%6i",                          sprintf(buf, "[%6i]   type=%c   Q:%2i   length:%6i",
289                                          data->frame_num,                                          data->frame_num,
290                                          type2char(data->type),                                          type2char(data->type),
291                                          data->quant,                                          data->quant,
# Line 384  Line 384 
384          pass2.max_overflow_improvement = codec->config.twopass_max_overflow_improvement;          pass2.max_overflow_improvement = codec->config.twopass_max_overflow_improvement;
385          pass2.max_overflow_degradation = codec->config.twopass_max_overflow_degradation;          pass2.max_overflow_degradation = codec->config.twopass_max_overflow_degradation;
386              pass2.kfreduction = codec->config.kfreduction;              pass2.kfreduction = codec->config.kfreduction;
387          pass2.min_key_interval = codec->config.min_key_interval;          pass2.kfthreshold = codec->config.kfthreshold;
388          pass2.container_frame_overhead = 24;    /* AVI */          pass2.container_frame_overhead = 24;    /* AVI */
389    
390          plugins[create.num_plugins].func = xvid_plugin_2pass2;          plugins[create.num_plugins].func = xvid_plugin_2pass2;
# Line 489  Line 489 
489      int i;      int i;
490    
491      for (i=0; i<config->num_zones && config->zones[i].frame <= framenum; i++) ;      for (i=0; i<config->num_zones && config->zones[i].frame <= framenum; i++) ;
     i--;  
492    
493        if (--i < 0) return; /* there are no zones, or we're before the first zone */
494    
495        if (framenum == config->zones[i].frame)
496      frame->type = config->zones[i].type;      frame->type = config->zones[i].type;
497    
498      if (config->zones[i].greyscale) {      if (config->zones[i].greyscale) {
# Line 555  Line 557 
557          if ((profiles[codec->config.profile].flags & PROFILE_INTERLACE) && codec->config.interlacing)          if ((profiles[codec->config.profile].flags & PROFILE_INTERLACE) && codec->config.interlacing)
558                  frame.vol_flags |= XVID_VOL_INTERLACING;                  frame.vol_flags |= XVID_VOL_INTERLACING;
559    
560            if (codec->config.ar_mode == 0) { /* PAR */
561                    if (codec->config.display_aspect_ratio != 5) {
562                            frame.par = codec->config.display_aspect_ratio + 1;
563                    } else {
564                            frame.par = XVID_PAR_EXT;
565                            frame.par_width = codec->config.par_x;
566                            frame.par_height= codec->config.par_y;
567                    }
568            } else { /* AR */
569                    /* custom pixel aspect ratio -> calculated from DAR */
570                    frame.par = XVID_PAR_EXT;
571                    frame.par_width = (100 * inhdr->biHeight) / codec->config.ar_y;
572                    frame.par_height= (100 * inhdr->biWidth) / codec->config.ar_x;;
573            }
574    
575      /* vop stuff */      /* vop stuff */
576    
577          frame.vop_flags |= XVID_VOP_HALFPEL;          frame.vop_flags |= XVID_VOP_HALFPEL;

Legend:
Removed from v.1234  
changed lines
  Added in v.1277

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