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

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

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

revision 1485, Sat Jul 10 17:42:18 2004 UTC revision 1486, Sat Jul 10 17:49:31 2004 UTC
# Line 20  Line 20 
20   *  along with this program ; if not, write to the Free Software   *  along with this program ; if not, write to the Free Software
21   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
22   *   *
23   * $Id: decoder.c,v 1.60 2004-07-03 08:33:16 syskin Exp $   * $Id: decoder.c,v 1.61 2004-07-10 17:49:31 edgomez Exp $
24   *   *
25   ****************************************************************************/   ****************************************************************************/
26    
# Line 393  Line 393 
393                                  const int reduced_resolution,                                  const int reduced_resolution,
394                                  const MACROBLOCK * pMB)                                  const MACROBLOCK * pMB)
395  {  {
         DECLARE_ALIGNED_MATRIX(block, 1, 64, int16_t, CACHE_LINE);  
396          DECLARE_ALIGNED_MATRIX(data, 6, 64, int16_t, CACHE_LINE);          DECLARE_ALIGNED_MATRIX(data, 6, 64, int16_t, CACHE_LINE);
397    
398          int stride = dec->edged_width;          int stride = dec->edged_width;
# Line 402  Line 401 
401          int i;          int i;
402          const uint32_t iQuant = pMB->quant;          const uint32_t iQuant = pMB->quant;
403          const int direction = dec->alternate_vertical_scan ? 2 : 0;          const int direction = dec->alternate_vertical_scan ? 2 : 0;
404          const quant_interFuncPtr dequant = dec->quant_type == 0 ? dequant_h263_inter : dequant_mpeg_inter;          typedef void (*get_inter_block_function_t)(
405                            Bitstream * bs,
406                            int16_t * block,
407                            int direction,
408                            const int quant,
409                            const uint16_t *matrix);
410    
411            const get_inter_block_function_t get_inter_block = (dec->quant_type == 0)
412                    ? get_inter_block_h263
413                    : get_inter_block_mpeg;
414    
415            memset(&data[0], 0, 6*64*sizeof(int16_t));      /* clear */
416    
417          for (i = 0; i < 6; i++) {          for (i = 0; i < 6; i++) {
418    
419                  if (cbp & (1 << (5 - i))) {     /* coded */                  if (cbp & (1 << (5 - i))) {     /* coded */
420    
                         memset(block, 0, 64 * sizeof(int16_t)); /* clear */  
421    
422                            /* Decode coeffs and dequantize on the fly */
423                          start_timer();                          start_timer();
424                          get_inter_block(bs, block, direction);                          get_inter_block(bs, &data[i*64], direction, iQuant, get_inter_matrix(dec->mpeg_quant_matrices));
425                          stop_coding_timer();                          stop_coding_timer();
426    
427                          start_timer();                          start_timer();
                         dequant(&data[i * 64], block, iQuant, dec->mpeg_quant_matrices);  
                         stop_iquant_timer();  
   
                         start_timer();  
428                          idct(&data[i * 64]);                          idct(&data[i * 64]);
429                          stop_idct_timer();                          stop_idct_timer();
430                  }                  }

Legend:
Removed from v.1485  
changed lines
  Added in v.1486

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