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

Diff of /branches/release-1_3-branch/xvidcore/src/utils/mbtransquant.c

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

revision 1660, Fri Dec 9 04:45:35 2005 UTC revision 1663, Sat Dec 10 05:20:35 2005 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: mbtransquant.c,v 1.30 2005-12-09 04:45:35 syskin Exp $   * $Id: mbtransquant.c,v 1.31 2005-12-10 05:20:35 syskin Exp $
25   *   *
26   ****************************************************************************/   ****************************************************************************/
27    
# Line 758  Line 758 
758          return -1;          return -1;
759  }  }
760    
761    #define TRELLIS_MIN_EFFORT      3
762    
763  /* this routine has been strippen of all debug code */  /* this routine has been strippen of all debug code */
764  static int  static int
765  dct_quantize_trellis_c(int16_t *const Out,  dct_quantize_trellis_c(int16_t *const Out,
# Line 796  Line 798 
798          Run_Costs[-1] = 2<<TL_SHIFT;          Run_Costs[-1] = 2<<TL_SHIFT;
799    
800          Non_Zero = Find_Last(Out, Zigzag, Non_Zero);          Non_Zero = Find_Last(Out, Zigzag, Non_Zero);
801          if (Non_Zero<0)          if (Non_Zero < TRELLIS_MIN_EFFORT)
802                  return 0; /* Sum is zero if there are only zero coeffs */                  Non_Zero = TRELLIS_MIN_EFFORT;
803    
804          for(i=0; i<=Non_Zero; i++) {          for(i=0; i<=Non_Zero; i++) {
805                  const int q = ((Q*QuantMatrix[Zigzag[i]])>>4);                  const int q = ((Q*QuantMatrix[Zigzag[i]])>>4);

Legend:
Removed from v.1660  
changed lines
  Added in v.1663

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