uoptsystemdependant.c 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /****************************************************************************
  2. *
  3. * Module Title : SystemDependant.c
  4. *
  5. * Description : Miscellaneous system dependant functions.
  6. *
  7. ****************************************************************************/
  8. /****************************************************************************
  9. * Header Files
  10. ****************************************************************************/
  11. #include "codec_common.h"
  12. #include "vputil_if.h"
  13. /****************************************************************************
  14. * Exports
  15. ****************************************************************************/
  16. // Scalar (no mmx) reconstruction functions
  17. extern void ClearSysState_C ( void );
  18. extern void IDctSlow ( INT16 *InputData, INT16 *QuantMatrix, INT16 *OutputData );
  19. extern void IDct10 ( INT16 *InputData, INT16 *QuantMatrix, INT16 *OutputData );
  20. extern void IDct1 ( INT16 *InputData, INT16 *QuantMatrix, INT16 *OutputData );
  21. extern void ScalarReconIntra ( INT16 *TmpDataBuffer, UINT8 *ReconPtr, UINT16 *ChangePtr, UINT32 LineStep );
  22. extern void ScalarReconInter ( INT16 *TmpDataBuffer, UINT8 *ReconPtr, UINT8 *RefPtr, INT16 *ChangePtr, UINT32 LineStep );
  23. extern void ScalarReconInterHalfPixel2 ( INT16 *TmpDataBuffer, UINT8 *ReconPtr,UINT8 *RefPtr1, UINT8 *RefPtr2, INT16 *ChangePtr, UINT32 LineStep );
  24. extern void ReconBlock_C(INT16 *SrcBlock,INT16 *ReconRefPtr, UINT8 *DestBlock, UINT32 LineStep );
  25. extern void SubtractBlock_C ( UINT8 *SrcBlock, INT16 *DestPtr, UINT32 LineStep );
  26. extern void UnpackBlock_C ( UINT8 *ReconPtr, INT16 *ReconRefPtr, UINT32 ReconPixelsPerLine );
  27. extern void AverageBlock_C ( UINT8 *ReconPtr1, UINT8 *ReconPtr2, UINT16 *ReconRefPtr, UINT32 ReconPixelsPerLine );
  28. extern void CopyBlock_C ( unsigned char *src, unsigned char *dest, unsigned int srcstride );
  29. extern void Copy12x12_C ( const unsigned char *src, unsigned char *dest, unsigned int srcstride, unsigned int deststride );
  30. extern void fdct_short_C ( INT16 *InputData, INT16 *OutputData );
  31. extern void FilterBlockBil_8_C( UINT8 *ReconPtr1, UINT8 *ReconPtr2, UINT8 *ReconRefPtr, UINT32 ReconPixelsPerLine, INT32 ModX, INT32 ModY );
  32. extern void FilterBlock_C( UINT8 *ReconPtr1, UINT8 *ReconPtr2, UINT16 *ReconRefPtr, UINT32 PixelsPerLine, INT32 ModX, INT32 ModY, BOOL UseBicubic, UINT8 BicubicAlpha );
  33. extern void GetProcessorFlags ( INT32 *MmxEnabled, INT32 *XmmEnabled, INT32 *WmtEnabled );
  34. /****************************************************************************
  35. *
  36. * ROUTINE : fillidctconstants
  37. *
  38. * INPUTS : None
  39. *
  40. * OUTPUTS : None
  41. *
  42. * RETURNS : void
  43. *
  44. * FUNCTION : STUB FUNCTION.
  45. *
  46. * SPECIAL NOTES : None.
  47. *
  48. ****************************************************************************/
  49. void fillidctconstants ( void )
  50. {
  51. }
  52. /****************************************************************************
  53. *
  54. * ROUTINE : MachineSpecificConfig
  55. *
  56. * INPUTS : None
  57. *
  58. * OUTPUTS : None
  59. *
  60. * RETURNS : None
  61. *
  62. * FUNCTION : Checks for machine specifc features such as MMX support
  63. * sets approipriate flags and function pointers.
  64. *
  65. * SPECIAL NOTES : None.
  66. *
  67. ****************************************************************************/
  68. void UtilMachineSpecificConfig ( void )
  69. {
  70. int i;
  71. for(i=0;i<=64;i++)
  72. {
  73. if(i<=1)idctc[i]=IDct1;
  74. else if(i<=10)idctc[i]=IDct10;
  75. else idctc[i]=IDctSlow;
  76. }
  77. fdct_short=fdct_short_C ;
  78. for(i=0;i<=64;i++)
  79. {
  80. if(i<=1)idct[i]=IDct1;
  81. else if(i<=10)idct[i]=IDct10;
  82. else idct[i]=IDctSlow;
  83. }
  84. ClearSysState = ClearSysState_C;
  85. ReconIntra = ScalarReconIntra;
  86. ReconInter = ScalarReconInter;
  87. ReconInterHalfPixel2 = ScalarReconInterHalfPixel2;
  88. AverageBlock = AverageBlock_C;
  89. UnpackBlock = UnpackBlock_C;
  90. ReconBlock = ReconBlock_C;
  91. SubtractBlock = SubtractBlock_C;
  92. CopyBlock = CopyBlock_C;
  93. Copy12x12 = Copy12x12_C;
  94. FilterBlockBil_8 = FilterBlockBil_8_C;
  95. FilterBlock=FilterBlock_C;
  96. }