[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.10, Wed Jun 12 20:38:40 2002 UTC
# Line 43  Line 43 
43  {  {
44          // decoder/encoder          // decoder/encoder
45          VECTOR mvs[4];          VECTOR mvs[4];
         uint32_t sad8[4];               // SAD values for inter4v-VECTORs  
         uint32_t sad16;                 // SAD value for inter-VECTOR  
46    
47      short int pred_values[6][MBPRED_SIZE];      short int pred_values[6][MBPRED_SIZE];
48      int acpred_directions[6];      int acpred_directions[6];
# Line 59  Line 57 
57    
58          // encoder specific          // encoder specific
59    
60            VECTOR mv16;
61          VECTOR pmvs[4];          VECTOR pmvs[4];
62    
63            int32_t sad8[4];                        // SAD values for inter4v-VECTORs
64            int32_t sad16;                          // SAD value for inter-VECTOR
65    
66          int dquant;          int dquant;
67          int cbp;          int cbp;
68    
# Line 71  Line 74 
74          int mb_type;          int mb_type;
75          int dbquant;          int dbquant;
76    
77  } MACROBLOCK;  }
78    MACROBLOCK;
79    
80  static __inline int8_t get_dc_scaler(int32_t quant, uint32_t lum)  static __inline int8_t
81    get_dc_scaler(uint32_t quant,
82                              uint32_t lum)
83  {  {
84      int8_t dc_scaler;          if (quant < 5)
85                    return 8;
         if(quant > 0 && quant < 5) {  
         dc_scaler = 8;  
                 return dc_scaler;  
         }  
86    
87          if(quant < 25 && !lum) {          if (quant < 25 && !lum)
88          dc_scaler = (quant + 13) >> 1;                  return (quant + 13) / 2;
                 return dc_scaler;  
         }  
89    
90          if(quant < 9) {          if (quant < 9)
91          dc_scaler = quant << 1;                  return 2 * quant;
                 return dc_scaler;  
         }  
92    
93      if(quant < 25) {          if (quant < 25)
94          dc_scaler = quant + 8;                  return quant + 8;
                 return dc_scaler;  
         }  
95    
96          if(lum)          if(lum)
97                  dc_scaler = (quant << 1) - 16;                  return 2 * quant - 16;
98          else          else
99          dc_scaler = quant - 6;                  return quant - 6;
   
     return dc_scaler;  
100  }  }
101    
   
102  // useful macros  // useful macros
103    
104  #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.10

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