[svn] / branches / release-1_3-branch / xvidcore / src / plugins / plugin_2pass2.c Repository:
ViewVC logotype

Diff of /branches/release-1_3-branch/xvidcore/src/plugins/plugin_2pass2.c

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

revision 1589, Sun Jan 9 20:26:42 2005 UTC revision 1876, Wed Jul 1 09:25:38 2009 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.6 2005-01-09 20:26:42 edgomez Exp $   * $Id: plugin_2pass2.c,v 1.8 2009-07-01 09:25:38 Isibaar Exp $
29   *   *
30   *****************************************************************************/   *****************************************************************************/
31    
# Line 457  Line 457 
457          if (rc->param.vbv_size==0) {          if (rc->param.vbv_size==0) {
458                  rc->param.vbv_size      =  3145728;                  rc->param.vbv_size      =  3145728;
459                  rc->param.vbv_initial   =  2359296;                  rc->param.vbv_initial   =  2359296;
460                  rc->param.vbv_maxrate  =  4000000;                  rc->param.vbv_maxrate   =  4854000;
461                  rc->param.vbv_peakrate = 10000000;                  rc->param.vbv_peakrate  =  8000000;
462          }          }
463  #endif  #endif
464    
# Line 954  Line 954 
954          /* We are done with the file */          /* We are done with the file */
955          fclose(f);          fclose(f);
956    
957          return(0);          if (!rc->num_keyframes) return (-1); /* No keyframes? Then something is wrong */
958            else return(0);
959  }  }
960    
961  /* open stats file(s) and read into rc->stats array */  /* open stats file(s) and read into rc->stats array */
# Line 1461  Line 1462 
1462           * typical values from DivX Home Theater profile:           * typical values from DivX Home Theater profile:
1463           *  vbv_size= 384*1024 (384kB)           *  vbv_size= 384*1024 (384kB)
1464           *  vbv_initial= 288*1024 (75% fill)           *  vbv_initial= 288*1024 (75% fill)
1465           *  maxrate= 4000000 (4MBps)           *  maxrate= 4854000 (4.854MBps)
1466           *  peakrate= 10000000 (10MBps)           *  peakrate= 8000000 (8MBps)
1467           *           *
1468           *  PAL: offset3s = 75 (3 seconds of 25fps)           *  PAL: offset3s = 75 (3 seconds of 25fps)
1469           *  NTSC: offset3s = 90 (3 seconds of 29.97fps) or 72 (3 seconds of 23.976fps)           *  NTSC: offset3s = 90 (3 seconds of 29.97fps) or 72 (3 seconds of 23.976fps)
# Line 1490  Line 1491 
1491                  if (i>=offset3s)                  if (i>=offset3s)
1492                          bytes3s -= rc->stats[i-offset3s].scaled_length;                          bytes3s -= rc->stats[i-offset3s].scaled_length;
1493    
1494                  if (8.f*bytes3s > 3*peakrate)      /* ignore peakrate constraint if peakrate is <= 0.f */
1495                    if (peakrate>0.f && 8.f*bytes3s > 3*peakrate)
1496                          return(VBV_PEAKRATE);                          return(VBV_PEAKRATE);
1497    
1498                  /* update vbv fill level */                  /* update vbv fill level */

Legend:
Removed from v.1589  
changed lines
  Added in v.1876

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