[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 1295, Sun Dec 21 16:28:49 2003 UTC revision 1296, Sun Dec 21 17:38:17 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.32 2003-12-21 12:41:48 syskin Exp $   * $Id: plugin_2pass2.c,v 1.1.2.33 2003-12-21 17:38:17 edgomez Exp $
29   *   *
30   *****************************************************************************/   *****************************************************************************/
31    
# Line 457  Line 457 
457          if (data->quant > 0)          if (data->quant > 0)
458                  return(0);                  return(0);
459    
460          /* Second case: insufficent stats data */          /* Second case: insufficent stats data
461             * We can't guess much what we should do, let core decide all alone */
462          if (data->frame_num >= rc->num_frames) {          if (data->frame_num >= rc->num_frames) {
463                  DPRINTF(XVID_DEBUG_RC,"[xvid rc] -- stats file too short (now processing frame %d)",                  DPRINTF(XVID_DEBUG_RC,"[xvid rc] -- stats file too short (now processing frame %d)",
464                          data->frame_num);                          data->frame_num);
465                  return(0);                  return(0);
466          }          }
467    
468          /* Third case: We are in a Quant zone */          /* Third case: We are in a Quant zone
469             * Quant zones must just ensure we use the same settings as first pass
470             * So set the quantizer and the type */
471          if (s->zone_mode == XVID_ZONE_QUANT) {          if (s->zone_mode == XVID_ZONE_QUANT) {
472                    /* Quant stuff */
473                  rc->fq_error += s->weight;                  rc->fq_error += s->weight;
474                  data->quant = (int)rc->fq_error;                  data->quant = (int)rc->fq_error;
475                  rc->fq_error -= data->quant;                  rc->fq_error -= data->quant;
476    
477                    /* The type stuff */
478                    data->type = s->type;
479    
480                    /* The only required data for AFTER step is this one for the overflow
481                     * control */
482                  s->desired_length = s->length;                  s->desired_length = s->length;
483    
484                  return(0);                  return(0);
# Line 1126  Line 1135 
1135                  scaler = 1.0;                  scaler = 1.0;
1136          }          }
1137  #endif  #endif
1138    
1139          /* Compute min frame lengths (for each frame type) according to the number          /* Compute min frame lengths (for each frame type) according to the number
1140           * of MBs. We sum all block type counters of frame 0, this gives us the           * of MBs. We sum all block type counters of frame 0, this gives us the
1141           * number of MBs.           * number of MBs.

Legend:
Removed from v.1295  
changed lines
  Added in v.1296

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