[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 1203, Tue Nov 11 16:25:39 2003 UTC revision 1204, Thu Nov 13 22:35:30 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.25 2003-11-13 22:35:30 edgomez Exp $
29   *   *
30   *****************************************************************************/   *****************************************************************************/
31    
# Line 823  Line 823 
823    
824                  char *ptr;                  char *ptr;
825                  char type;                  char type;
826                  int fields, nouse;                  int fields;
827    
828                  lines++;                  lines++;
829    
830                  /* We skip spaces */                  /* We skip spaces */
831                  ptr = skipspaces(line);                  ptr = skipspaces(line);
832    
833                  /* Skip coment lines */                  /* Skip coment lines or empty lines */
834                  if(iscomment(ptr)) {                  if(iscomment(ptr) || *ptr == '\0') {
835                          free(line);                          free(line);
836                          continue;                          continue;
837                  }                  }
838    
839                  /* Read the stat line from buffer */                  /* Read the stat line from buffer */
840                  fields = sscanf(ptr,                  fields = sscanf(ptr, "%c", &type);
                                                 "%c %d %d %d %d %d",  
                                                 &type, &nouse, &nouse, &nouse, &nouse, &nouse);  
841    
842                  /* Valid stats files have at least 6 fields */                  /* Valid stats files have at least 6 fields */
843                  if (fields == 6) {                  if (fields == 1) {
844                          switch(type) {                          switch(type) {
845                          case 'i':                          case 'i':
846                          case 'I':                          case 'I':
# Line 901  Line 899 
899                  /* We skip spaces */                  /* We skip spaces */
900                  ptr = skipspaces(line);                  ptr = skipspaces(line);
901    
902                  /* Skip comment lines */                  /* Skip comment lines or empty lines */
903                  if(iscomment(ptr)) {                  if(iscomment(ptr) || *ptr == '\0') {
904                          free(line);                          free(line);
905                          continue;                          continue;
906                  }                  }
# Line 1278  Line 1276 
1276                  } else {                  } else {
1277                          rc->avg_length[i] = rc->tot_scaled_length[i];                          rc->avg_length[i] = rc->tot_scaled_length[i];
1278    
1279                          if (i == XVID_TYPE_IVOP) {                          if (i == (XVID_TYPE_IVOP-1)) {
1280                                  /* I Frames total has to be added the boost total */                                  /* I Frames total has to be added the boost total */
1281                                  rc->avg_length[i] += ivop_boost_total;                                  rc->avg_length[i] += ivop_boost_total;
1282                          } else {                          } else {

Legend:
Removed from v.1203  
changed lines
  Added in v.1204

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