[cvs] / xvidcore / src / utils / mbtransquant.c Repository:
ViewVC logotype

Diff of /xvidcore/src/utils/mbtransquant.c

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

revision 1.21.2.1, Sat Feb 22 08:49:45 2003 UTC revision 1.21.2.4, Sun Mar 16 12:04:14 2003 UTC
# Line 85  Line 85 
85          uint32_t stride2 = stride / 2;          uint32_t stride2 = stride / 2;
86          uint32_t next_block = stride * ((frame->vop_flags & XVID_REDUCED)?16:8);          uint32_t next_block = stride * ((frame->vop_flags & XVID_REDUCED)?16:8);
87          uint32_t i;          uint32_t i;
88          uint32_t iQuant = frame->quant;          const uint32_t iQuant = pMB->quant;
89          uint8_t *pY_Cur, *pU_Cur, *pV_Cur;          uint8_t *pY_Cur, *pU_Cur, *pV_Cur;
90          IMAGE *pCurrent = &frame->image;          IMAGE *pCurrent = &frame->image;
91    
# Line 209  Line 209 
209          uint32_t stride2 = stride / 2;          uint32_t stride2 = stride / 2;
210          uint32_t next_block = stride * ((frame->vop_flags & XVID_REDUCED)?16:8);          uint32_t next_block = stride * ((frame->vop_flags & XVID_REDUCED)?16:8);
211          uint32_t i;          uint32_t i;
212          uint32_t iQuant = frame->quant;          const uint32_t iQuant = pMB->quant;
213          uint8_t *pY_Cur, *pU_Cur, *pV_Cur;          uint8_t *pY_Cur, *pU_Cur, *pV_Cur;
214          uint8_t cbp = 0;          uint8_t cbp = 0;
215          uint32_t sum;          uint32_t sum;
# Line 329  Line 329 
329          MBTrans(pParam,frame,pMB,x_pos,y_pos,data);          MBTrans(pParam,frame,pMB,x_pos,y_pos,data);
330          MBfDCT(pParam,frame,pMB,data);          MBfDCT(pParam,frame,pMB,data);
331          MBQuantIntra(pParam,frame,pMB,data,qcoeff);          MBQuantIntra(pParam,frame,pMB,data,qcoeff);
332          MBDeQuantIntra(pParam,frame->quant,data,qcoeff);          MBDeQuantIntra(pParam,pMB->quant,data,qcoeff);
333          MBiDCT(data,0x3F);          MBiDCT(data,0x3F);
334          MBTransAdd(pParam,frame,pMB,x_pos,y_pos,data,0x3F);          MBTransAdd(pParam,frame,pMB,x_pos,y_pos,data,0x3F);
335  }  }
# Line 349  Line 349 
349  /* there is no MBTrans for Inter block, that's done in motion compensation already */  /* there is no MBTrans for Inter block, that's done in motion compensation already */
350    
351          MBfDCT(pParam,frame,pMB,data);          MBfDCT(pParam,frame,pMB,data);
352          cbp = MBQuantInter(pParam,frame->quant,data,qcoeff);          cbp = MBQuantInter(pParam,pMB->quant,data,qcoeff);
353          MBDeQuantInter(pParam,frame->quant,data,qcoeff,cbp);          MBDeQuantInter(pParam,pMB->quant,data,qcoeff,cbp);
354          MBiDCT(data,cbp);          MBiDCT(data,cbp);
355          MBTransAdd(pParam,frame,pMB,x_pos,y_pos,data,cbp);          MBTransAdd(pParam,frame,pMB,x_pos,y_pos,data,cbp);
356    
# Line 361  Line 361 
361  MBTransQuantInterBVOP(const MBParam * pParam,  MBTransQuantInterBVOP(const MBParam * pParam,
362                                    FRAMEINFO * frame,                                    FRAMEINFO * frame,
363                                    MACROBLOCK * pMB,                                    MACROBLOCK * pMB,
364                                      const uint32_t x_pos,
365                                      const uint32_t y_pos,
366                                    int16_t data[6 * 64],                                    int16_t data[6 * 64],
367                                    int16_t qcoeff[6 * 64])                                    int16_t qcoeff[6 * 64])
368  {  {
# Line 369  Line 371 
371  /* there is no MBTrans for Inter block, that's done in motion compensation already */  /* there is no MBTrans for Inter block, that's done in motion compensation already */
372    
373          MBfDCT(pParam,frame,pMB,data);          MBfDCT(pParam,frame,pMB,data);
374          cbp = MBQuantInter(pParam,frame->quant,data,qcoeff);          cbp = MBQuantInter(pParam,pMB->quant,data,qcoeff);
375    
376            /*
377             * History comment:
378             * we don't have to DeQuant, iDCT and Transfer back data for B-frames
379             */
380    
381  /* we don't have to DeQuant, iDCT and Transfer back data for B-frames */          /*
382             * As an exception to the previous rule, if we are willing to have extra
383             * stats then we have to DeQuant, iDCT and Transfer back the data :-)
384             */
385            if((pParam->plugin_flags & XVID_REQORIGINAL)) {
386                    MBDeQuantInter(pParam,pMB->quant,data,qcoeff,cbp);
387                    MBiDCT(data,cbp);
388                    MBTransAdd(pParam,frame,pMB,x_pos,y_pos,data,cbp);
389            }
390    
391          return cbp;          return cbp;
392  }  }
# Line 407  Line 422 
422                                          int16_t data[6*64])                                          int16_t data[6*64])
423  {  {
424          int i;          int i;
425          int iQuant = frame->quant;          int iQuant = pMB->quant;
426    
427          start_timer();          start_timer();
428          pMB->field_dct = 0;          pMB->field_dct = 0;
# Line 447  Line 462 
462                           int16_t data[6*64])                           int16_t data[6*64])
463  {  {
464          int i;          int i;
465          int iQuant = frame->quant;          int iQuant = pMB->quant;
466    
467          start_timer();          start_timer();
468          pMB->field_dct = 0;          pMB->field_dct = 0;

Legend:
Removed from v.1.21.2.1  
changed lines
  Added in v.1.21.2.4

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