[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 1202, Sun Nov 9 20:49:21 2003 UTC revision 1219, Wed Nov 19 15:59:41 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.24 2003-11-09 20:49:21 edgomez Exp $   * $Id: plugin_2pass2.c,v 1.1.2.27 2003-11-19 15:59:41 edgomez Exp $
29   *   *
30   *****************************************************************************/   *****************************************************************************/
31    
# Line 220  Line 220 
220  {  {
221          switch(opt) {          switch(opt) {
222          case XVID_PLG_INFO :          case XVID_PLG_INFO :
223            case XVID_PLG_FRAME :
224                  return 0;                  return 0;
225    
226          case XVID_PLG_CREATE :          case XVID_PLG_CREATE :
# Line 616  Line 617 
617                          b_ref--;                          b_ref--;
618    
619                  /* Compute the original quant */                  /* Compute the original quant */
620                  s->quant  = 100*s->quant - data->bquant_offset;                  s->quant  = 2*(100*s->quant - data->bquant_offset);
621                  s->quant += data->bquant_ratio - 1; /* to avoid rouding issues */                  s->quant += data->bquant_ratio - 1; /* to avoid rouding issues */
622                  s->quant  = s->quant/data->bquant_ratio - b_ref->quant;                  s->quant  = s->quant/data->bquant_ratio - b_ref->quant;
623          }          }
# Line 823  Line 824 
824    
825                  char *ptr;                  char *ptr;
826                  char type;                  char type;
827                  int fields, nouse;                  int fields;
828    
829                  lines++;                  lines++;
830    
831                  /* We skip spaces */                  /* We skip spaces */
832                  ptr = skipspaces(line);                  ptr = skipspaces(line);
833    
834                  /* Skip coment lines */                  /* Skip coment lines or empty lines */
835                  if(iscomment(ptr)) {                  if(iscomment(ptr) || *ptr == '\0') {
836                          free(line);                          free(line);
837                          continue;                          continue;
838                  }                  }
839    
840                  /* Read the stat line from buffer */                  /* Read the stat line from buffer */
841                  fields = sscanf(ptr,                  fields = sscanf(ptr, "%c", &type);
                                                 "%c %d %d %d %d %d",  
                                                 &type, &nouse, &nouse, &nouse, &nouse, &nouse);  
842    
843                  /* Valid stats files have at least 6 fields */                  /* Valid stats files have at least 6 fields */
844                  if (fields == 6) {                  if (fields == 1) {
845                          switch(type) {                          switch(type) {
846                          case 'i':                          case 'i':
847                          case 'I':                          case 'I':
# Line 901  Line 900 
900                  /* We skip spaces */                  /* We skip spaces */
901                  ptr = skipspaces(line);                  ptr = skipspaces(line);
902    
903                  /* Skip comment lines */                  /* Skip comment lines or empty lines */
904                  if(iscomment(ptr)) {                  if(iscomment(ptr) || *ptr == '\0') {
905                          free(line);                          free(line);
906                          continue;                          continue;
907                  }                  }
# Line 1278  Line 1277 
1277                  } else {                  } else {
1278                          rc->avg_length[i] = rc->tot_scaled_length[i];                          rc->avg_length[i] = rc->tot_scaled_length[i];
1279    
1280                          if (i == XVID_TYPE_IVOP) {                          if (i == (XVID_TYPE_IVOP-1)) {
1281                                  /* I Frames total has to be added the boost total */                                  /* I Frames total has to be added the boost total */
1282                                  rc->avg_length[i] += ivop_boost_total;                                  rc->avg_length[i] += ivop_boost_total;
1283                          } else {                          } else {

Legend:
Removed from v.1202  
changed lines
  Added in v.1219

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