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

Diff of /branches/dev-api-4/xvidcore/src/utils/mbtransquant.c

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

revision 1012, Sun May 11 13:26:14 2003 UTC revision 1014, Mon May 12 12:33:16 2003 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.21.2.11 2003-05-11 13:26:14 chl Exp $   * $Id: mbtransquant.c,v 1.21.2.12 2003-05-12 12:33:16 suxen_drol Exp $
25   *   *
26   ****************************************************************************/   ****************************************************************************/
27    
# Line 745  Line 745 
745  };  };
746  #undef TL  #undef TL
747    
748  static inline int Find_Last(const int16_t *C, const uint16_t *Zigzag, int i)  static __inline int Find_Last(const int16_t *C, const uint16_t *Zigzag, int i)
749  {  {
750    while(i>=0)    while(i>=0)
751      if (C[Zigzag[i]])      if (C[Zigzag[i]])
# Line 778  Line 778 
778    const int Lambda = Trellis_Lambda_Tabs[Q-1];    // it's 1/lambda, actually    const int Lambda = Trellis_Lambda_Tabs[Q-1];    // it's 1/lambda, actually
779    
780    int Run_Start = -1;    int Run_Start = -1;
   Run_Costs[-1] = 2<<16;                          // source (w/ CBP penalty)  
781    uint32_t Min_Cost = 2<<16;    uint32_t Min_Cost = 2<<16;
782    
783    int Last_Node = -1;    int Last_Node = -1;
784    uint32_t Last_Cost = 0;    uint32_t Last_Cost = 0;
785    
786    int i, j;    int i, j;
787      Run_Costs[-1] = 2<<16;                          // source (w/ CBP penalty)
788    
789    Non_Zero = Find_Last(Out, Zigzag, Non_Zero);    Non_Zero = Find_Last(Out, Zigzag, Non_Zero);
790    if (Non_Zero<0)    if (Non_Zero<0)
# Line 969  Line 969 
969    
970  #define DBG 0  #define DBG 0
971    
972  static inline uint32_t Evaluate_Cost(const int16_t *C, int Mult, int Bias,  static __inline uint32_t Evaluate_Cost(const int16_t *C, int Mult, int Bias,
973                                  const uint16_t * Zigzag, int Max, int Lambda)                                  const uint16_t * Zigzag, int Max, int Lambda)
974  {  {
975  #if (DBG>0)  #if (DBG>0)

Legend:
Removed from v.1012  
changed lines
  Added in v.1014

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