[svn] / branches / release-1_0-branch / xvidcore / src / encoder.c Repository:
ViewVC logotype

Diff of /branches/release-1_0-branch/xvidcore/src/encoder.c

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

revision 1404, Sun Apr 4 02:27:50 2004 UTC revision 1507, Sun Jul 18 12:03:19 2004 UTC
# Line 21  Line 21 
21   *  along with this program ; if not, write to the Free Software   *  along with this program ; if not, write to the Free Software
22   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
23   *   *
24   * $Id: encoder.c,v 1.102.2.3 2004-04-04 02:27:50 syskin Exp $   * $Id: encoder.c,v 1.102.2.7 2004-07-18 12:03:19 edgomez Exp $
25   *   *
26   ****************************************************************************/   ****************************************************************************/
27    
# Line 100  Line 100 
100                  i--;                  i--;
101          }          }
102    
103          /* if neccessary, round to 65535 accuracy */          if (*base > 65535 || *inc > 65535) {
104          if (*base > 65535) {                  int *biggest;
105                  float div = (float) *base / 65535;                  int *other;
106                  *base = (int) (*base / div);                  float div;
107                  *inc = (int) (*inc / div);  
108                    if (*base > *inc) {
109                            biggest = base;
110                            other = inc;
111                    } else {
112                            biggest = inc;
113                            other = base;
114                    }
115    
116                    div = ((float)*biggest)/((float)65535);
117                    *biggest = (int)(((float)*biggest)/div);
118                    *other = (int)(((float)*other)/div);
119          }          }
120  }  }
121    
# Line 1857  Line 1868 
1868  #endif  #endif
1869          if (current->sStat.kblks + current->sStat.mblks <=          if (current->sStat.kblks + current->sStat.mblks <=
1870                  (pParam->frame_drop_ratio * mb_width * mb_height) / 100 &&                  (pParam->frame_drop_ratio * mb_width * mb_height) / 100 &&
1871                  ((pEnc->bframenum_tail == 0) || !(pEnc->mbParam.global_flags & XVID_GLOBAL_CLOSED_GOP)) )                  pEnc->mbParam.max_bframes == 0)
1872          {          {
1873                  current->sStat.kblks = current->sStat.mblks = 0;                  current->sStat.kblks = current->sStat.mblks = 0;
1874                  current->sStat.ublks = mb_width * mb_height;                  current->sStat.ublks = mb_width * mb_height;

Legend:
Removed from v.1404  
changed lines
  Added in v.1507

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