[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 1161, Wed Oct 1 23:23:01 2003 UTC revision 1174, Tue Oct 7 13:02:35 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.17 2003-10-01 23:23:01 edgomez Exp $   * $Id: mbtransquant.c,v 1.21.2.18 2003-10-07 13:02:35 edgomez Exp $
25   *   *
26   ****************************************************************************/   ****************************************************************************/
27    
# Line 39  Line 39 
39  #include "../bitstream/zigzag.h"  #include "../bitstream/zigzag.h"
40  #include "../dct/fdct.h"  #include "../dct/fdct.h"
41  #include "../dct/idct.h"  #include "../dct/idct.h"
42  #include "../quant/quant_mpeg4.h"  #include "../quant/quant.h"
 #include "../quant/quant_h263.h"  
43  #include "../encoder.h"  #include "../encoder.h"
44    
45  #include "../image/reduced.h"  #include "../image/reduced.h"
# Line 126  Line 125 
125          int mpeg;          int mpeg;
126          int scaler_lum, scaler_chr;          int scaler_lum, scaler_chr;
127    
128          quanth263_intraFuncPtr const quant[2] =          quant_intraFuncPtr const quant[2] =
129                  {                  {
130                          (quanth263_intraFuncPtr)quant_intra,                          quant_h263_intra,
131                          (quanth263_intraFuncPtr)quant4_intra                          quant_mpeg_intra
132                  };                  };
133    
134          mpeg = !!(pParam->vol_flags & XVID_VOL_MPEGQUANT);          mpeg = !!(pParam->vol_flags & XVID_VOL_MPEGQUANT);
# Line 157  Line 156 
156          int mpeg;          int mpeg;
157          int scaler_lum, scaler_chr;          int scaler_lum, scaler_chr;
158    
159          quanth263_intraFuncPtr const dequant[2] =          quant_intraFuncPtr const dequant[2] =
160                  {                  {
161                          (quanth263_intraFuncPtr)dequant_intra,                          dequant_h263_intra,
162                          (quanth263_intraFuncPtr)dequant4_intra                          dequant_mpeg_intra
163                  };                  };
164    
165          mpeg = !!(pParam->vol_flags & XVID_VOL_MPEGQUANT);          mpeg = !!(pParam->vol_flags & XVID_VOL_MPEGQUANT);
# Line 214  Line 213 
213          int sum;          int sum;
214          int code_block, mpeg;          int code_block, mpeg;
215    
216          quanth263_interFuncPtr const quant[2] =          quant_interFuncPtr const quant[2] =
217                  {                  {
218                          (quanth263_interFuncPtr)quant_inter,                          quant_h263_inter,
219                          (quanth263_interFuncPtr)quant4_inter                          quant_mpeg_inter
220                  };                  };
221    
222          trellis_func_ptr_t const trellis[2] =          trellis_func_ptr_t const trellis[2] =
223                  {                  {
224                          (trellis_func_ptr_t)dct_quantize_trellis_h263_c,                          dct_quantize_trellis_h263_c,
225                          (trellis_func_ptr_t)dct_quantize_trellis_mpeg_c                          dct_quantize_trellis_mpeg_c
226                  };                  };
227    
228          mpeg = !!(pParam->vol_flags & XVID_VOL_MPEGQUANT);          mpeg = !!(pParam->vol_flags & XVID_VOL_MPEGQUANT);
# Line 277  Line 276 
276  {  {
277          int mpeg;          int mpeg;
278    
279          quanth263_interFuncPtr const dequant[2] =          quant_interFuncPtr const dequant[2] =
280                  {                  {
281                          (quanth263_interFuncPtr)dequant_inter,                          dequant_h263_inter,
282                          (quanth263_interFuncPtr)dequant4_inter                          dequant_mpeg_inter
283                  };                  };
284    
285          mpeg = !!(pParam->vol_flags & XVID_VOL_MPEGQUANT);          mpeg = !!(pParam->vol_flags & XVID_VOL_MPEGQUANT);
# Line 362  Line 361 
361          uint32_t cst;          uint32_t cst;
362          int vop_reduced;          int vop_reduced;
363          const IMAGE * const pCurrent = &frame->image;          const IMAGE * const pCurrent = &frame->image;
364    
365          /* Array of function pointers, indexed by [vop_reduced<<1+add] */          /* Array of function pointers, indexed by [vop_reduced<<1+add] */
366          transfer_operation_16to8_t  * const functions[4] =          transfer_operation_16to8_t  * const functions[4] =
367                  {                  {
# Line 449  Line 449 
449          uint8_t cbp;          uint8_t cbp;
450          uint32_t limit;          uint32_t limit;
451    
452          /*          /* There is no MBTrans8to16 for Inter block, that's done in motion compensation
453           * There is no MBTrans8to16 for Inter block, that's done in motion compensation           * already */
          * already  
          */  
454    
455          /* Perform DCT (and field decision) */          /* Perform DCT (and field decision) */
456          MBfDCT(pParam, frame, pMB, x_pos, y_pos, data);          MBfDCT(pParam, frame, pMB, x_pos, y_pos, data);
# Line 490  Line 488 
488          uint8_t cbp;          uint8_t cbp;
489          uint32_t limit;          uint32_t limit;
490    
491          /*          /* There is no MBTrans8to16 for Inter block, that's done in motion compensation
492           * There is no MBTrans8to16 for Inter block, that's done in motion compensation           * already */
          * already  
          */  
493    
494          /* Perform DCT (and field decision) */          /* Perform DCT (and field decision) */
495          MBfDCT(pParam, frame, pMB, x_pos, y_pos, data);          MBfDCT(pParam, frame, pMB, x_pos, y_pos, data);
# Line 511  Line 507 
507           * History comment:           * History comment:
508           * We don't have to DeQuant, iDCT and Transfer back data for B-frames.           * We don't have to DeQuant, iDCT and Transfer back data for B-frames.
509           *           *
510           * BUT some plugins require the original frame to be passed so we have           * BUT some plugins require the rebuilt original frame to be passed so we
511           * to take care of that here           * have to take care of that here
512           */           */
513          if((pParam->plugin_flags & XVID_REQORIGINAL)) {          if((pParam->plugin_flags & XVID_REQORIGINAL)) {
514    
# Line 637  Line 633 
633          MOVLINE(LINE(3, 3), tmp);          MOVLINE(LINE(3, 3), tmp);
634  }  }
635    
   
   
   
   
636  /*****************************************************************************  /*****************************************************************************
637   *               Trellis based R-D optimal quantization   *               Trellis based R-D optimal quantization
638   *   *
# Line 648  Line 640 
640   *   *
641   ****************************************************************************/   ****************************************************************************/
642    
   
 #if 0  
 static int  
 dct_quantize_trellis_mpeg_c(int16_t *const Out,  
                                                         const int16_t *const In,  
                                                         int Q,  
                                                         const uint16_t * const Zigzag,  
                                                         int Non_Zero)  
 {  
         return 63;  
 }  
 #endif  
   
643  /*----------------------------------------------------------------------------  /*----------------------------------------------------------------------------
644   *   *
645   *        Trellis-Based quantization   *        Trellis-Based quantization

Legend:
Removed from v.1161  
changed lines
  Added in v.1174

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