[cvs] / xvidcore / src / global.h Repository:
ViewVC logotype

Diff of /xvidcore/src/global.h

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

revision 1.6, Fri May 3 00:45:10 2002 UTC revision 1.8, Sat May 11 12:28:19 2002 UTC
# Line 43  Line 43 
43  {  {
44          // decoder/encoder          // decoder/encoder
45          VECTOR mvs[4];          VECTOR mvs[4];
46          uint32_t sad8[4];               // SAD values for inter4v-VECTORs          int32_t sad8[4];                // (signed!) SAD values for inter4v-VECTORs
47          uint32_t sad16;                 // SAD value for inter-VECTOR          int32_t sad16;                  // (signed!) SAD value for inter-VECTOR
48    
49      short int pred_values[6][MBPRED_SIZE];      short int pred_values[6][MBPRED_SIZE];
50      int acpred_directions[6];      int acpred_directions[6];
# Line 73  Line 73 
73    
74  } MACROBLOCK;  } MACROBLOCK;
75    
76  static __inline int8_t get_dc_scaler(int32_t quant, uint32_t lum)  static __inline int8_t get_dc_scaler(uint32_t quant, uint32_t lum)
77  {  {
78      int8_t dc_scaler;          if(quant < 5)
79            return 8;
80    
81          if(quant > 0 && quant < 5) {          if(quant < 25 && !lum)
82          dc_scaler = 8;          return (quant + 13) / 2;
                 return dc_scaler;  
         }  
83    
84          if(quant < 25 && !lum) {          if(quant < 9)
85          dc_scaler = (quant + 13) >> 1;          return 2 * quant;
                 return dc_scaler;  
         }  
86    
87          if(quant < 9) {      if(quant < 25)
88          dc_scaler = quant << 1;          return quant + 8;
                 return dc_scaler;  
         }  
   
     if(quant < 25) {  
         dc_scaler = quant + 8;  
                 return dc_scaler;  
         }  
89    
90          if(lum)          if(lum)
91                  dc_scaler = (quant << 1) - 16;                  return 2 * quant - 16;
92          else          else
93          dc_scaler = quant - 6;          return quant - 6;
   
     return dc_scaler;  
94  }  }
95    
   
96  // useful macros  // useful macros
97    
98  #define MIN(X, Y) ((X)<(Y)?(X):(Y))  #define MIN(X, Y) ((X)<(Y)?(X):(Y))

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.8

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