[svn] / branches / dev-api-4 / xvidcore / src / quant / quant_h263.c Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/src/quant/quant_h263.c

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

revision 1175, Tue Oct 7 14:16:29 2003 UTC revision 1176, Thu Oct 9 18:50:22 2003 UTC
# Line 19  Line 19 
19   *  along with this program ; if not, write to the Free Software   *  along with this program ; if not, write to the Free Software
20   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21   *   *
22   * $Id: quant_h263.c,v 1.7.2.2 2003-10-07 13:02:35 edgomez Exp $   * $Id: quant_h263.c,v 1.7.2.3 2003-10-09 18:50:22 edgomez Exp $
23   *   *
24   ****************************************************************************/   ****************************************************************************/
25    
# Line 75  Line 75 
75  {  {
76          const uint32_t mult = multipliers[quant];          const uint32_t mult = multipliers[quant];
77          const uint16_t quant_m_2 = quant << 1;          const uint16_t quant_m_2 = quant << 1;
         uint32_t sum = 0;  
78          int i;          int i;
79    
80          coeff[0] = DIV_DIV(data[0], (int32_t) dcscalar);          coeff[0] = DIV_DIV(data[0], (int32_t) dcscalar);
         sum += coeff[0];  
81    
82          for (i = 1; i < 64; i++) {          for (i = 1; i < 64; i++) {
83                  int16_t acLevel = data[i];                  int16_t acLevel = data[i];
# Line 91  Line 89 
89                                  continue;                                  continue;
90                          }                          }
91                          acLevel = (acLevel * mult) >> SCALEBITS;                          acLevel = (acLevel * mult) >> SCALEBITS;
                         sum += acLevel;  
92                          coeff[i] = -acLevel;                          coeff[i] = -acLevel;
93                  } else {                  } else {
94                          if (acLevel < quant_m_2) {                          if (acLevel < quant_m_2) {
# Line 99  Line 96 
96                                  continue;                                  continue;
97                          }                          }
98                          acLevel = (acLevel * mult) >> SCALEBITS;                          acLevel = (acLevel * mult) >> SCALEBITS;
                         sum += acLevel;  
99                          coeff[i] = acLevel;                          coeff[i] = acLevel;
100                  }                  }
101          }          }
102    
103          return(sum);          return(0);
104  }  }
105    
106    

Legend:
Removed from v.1175  
changed lines
  Added in v.1176

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