doptsystemdependant.c 6.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /****************************************************************************
  2. *
  3. * Module Title : SystemDependant.c
  4. *
  5. * Description : Miscellaneous system dependant functions
  6. *
  7. ****************************************************************************/
  8. /*******************************************3********************************
  9. * Header Files
  10. ****************************************************************************/
  11. #include "postp.h"
  12. /****************************************************************************
  13. * Imports
  14. ****************************************************************************/
  15. extern void GetProcessorFlags ( INT32 *MmxEnabled, INT32 *XmmEnabled, INT32 *WmtEnabled );
  16. extern void FilteringVert_12_C ( UINT32 QValue,UINT8 *Src, INT32 Pitch);
  17. extern void FilteringHoriz_12_C ( UINT32 QValue, UINT8 *Src, INT32 Pitch );
  18. extern void FilteringVert_8_C ( UINT32 QValue, UINT8 *Src, INT32 Pitch );
  19. extern void FilteringHoriz_8_C ( UINT32 QValue, UINT8 *Src, INT32 Pitch );
  20. extern void HorizontalLine_1_2_Scale_C ( const unsigned char *source, unsigned int sourceWidth, unsigned char *dest, unsigned int destWidth );
  21. extern void HorizontalLine_3_5_Scale_C ( const unsigned char *source, unsigned int sourceWidth, unsigned char *dest, unsigned int destWidth );
  22. extern void HorizontalLine_4_5_Scale_C ( const unsigned char *source, unsigned int sourceWidth, unsigned char *dest, unsigned int destWidth );
  23. extern void VerticalBand_4_5_Scale_C ( unsigned char *dest, unsigned int destPitch, unsigned int destWidth );
  24. extern void LastVerticalBand_4_5_Scale_C ( unsigned char *dest, unsigned int destPitch, unsigned int destWidth );
  25. extern void VerticalBand_3_5_Scale_C ( unsigned char *dest, unsigned int destPitch, unsigned int destWidth );
  26. extern void LastVerticalBand_3_5_Scale_C ( unsigned char *dest, unsigned int destPitch, unsigned int destWidth );
  27. extern void VerticalBand_1_2_Scale_C ( unsigned char *dest, unsigned int destPitch, unsigned int destWidth );
  28. extern void LastVerticalBand_1_2_Scale_C ( unsigned char *dest, unsigned int destPitch, unsigned int destWidth );
  29. extern void FilterHoriz_Simple_C ( POSTPROC_INSTANCE *pbi, UINT8 *PixelPtr, INT32 LineLength, INT32 *BoundingValuePtr );
  30. extern void FilterVert_Simple_C ( POSTPROC_INSTANCE *pbi, UINT8 *PixelPtr, INT32 LineLength, INT32 *BoundingValuePtr );
  31. extern void FilterHoriz_Generic ( POSTPROC_INSTANCE *pbi, UINT8 *PixelPtr, INT32 LineLength, INT32 *BoundingValuePtr );
  32. extern void FilterVert_Generic ( POSTPROC_INSTANCE *pbi, UINT8 *PixelPtr, INT32 LineLength, INT32 *BoundingValuePtr );
  33. extern INT32 *SetupBoundingValueArray_Generic ( POSTPROC_INSTANCE *pbi, INT32 FLimit );
  34. extern INT32 *SetupDeblockValueArray_Generic ( POSTPROC_INSTANCE *pbi, INT32 FLimit );
  35. extern void DeringBlockWeak_C ( POSTPROC_INSTANCE *pbi, const UINT8 *SrcPtr, UINT8 *DstPtr, const INT32 Pitch, UINT32 FragQIndex, UINT32 *QuantScale );
  36. extern void DeringBlockStrong_C ( POSTPROC_INSTANCE *pbi, const UINT8 *SrcPtr, UINT8 *DstPtr, const INT32 Pitch, UINT32 FragQIndex, UINT32 *QuantScale );
  37. extern void DeblockLoopFilteredBand_C ( POSTPROC_INSTANCE *pbi, UINT8 *SrcPtr, UINT8 *DesPtr, UINT32 PlaneLineStep, UINT32 FragsAcross, UINT32 StartFrag, UINT32 *QuantScale );
  38. extern void DeblockNonFilteredBand_C ( POSTPROC_INSTANCE *pbi, UINT8 *SrcPtr, UINT8 *DesPtr, UINT32 PlaneLineStep, UINT32 FragsAcross, UINT32 StartFrag, UINT32 *QuantScale );
  39. extern void DeblockNonFilteredBandNewFilter_C ( POSTPROC_INSTANCE *pbi, UINT8 *SrcPtr, UINT8 *DesPtr, UINT32 PlaneLineStep, UINT32 FragsAcross, UINT32 StartFrag, UINT32 *QuantScale );
  40. extern void ClampLevels_C( POSTPROC_INSTANCE *pbi,INT32 BlackClamp,INT32 WhiteClamp,UINT8 *Src,UINT8 *Dst);
  41. extern void CFastDeInterlace(UINT8 * SrcPtr,UINT8 * DstPtr,INT32 Width,INT32 Height,INT32 Stride);
  42. extern void PlaneAddNoise_C( UINT8 *Start, UINT32 Width, UINT32 Height, INT32 Pitch, int q);
  43. /****************************************************************************
  44. *
  45. * ROUTINE : PostProcMachineSpecificConfig
  46. *
  47. * INPUTS : UINT32 version : Codec version number (UNUSED)
  48. *
  49. * OUTPUTS : None.
  50. *
  51. * RETURNS : void
  52. *
  53. * FUNCTION : Sets post-processing function pointers to vanilla
  54. * C implementations.
  55. *
  56. * SPECIAL NOTES : None.
  57. *
  58. ****************************************************************************/
  59. void PostProcMachineSpecificConfig ( UINT32 Version )
  60. {
  61. FilterHoriz = FilterHoriz_Generic;
  62. FilterVert = FilterVert_Generic;
  63. SetupBoundingValueArray = SetupBoundingValueArray_Generic;
  64. SetupDeblockValueArray = SetupDeblockValueArray_Generic;
  65. DeringBlockWeak = DeringBlockWeak_C;
  66. DeringBlockStrong = DeringBlockStrong_C;
  67. DeblockLoopFilteredBand = DeblockLoopFilteredBand_C;
  68. DeblockNonFilteredBand = DeblockNonFilteredBand_C;
  69. DeblockNonFilteredBandNewFilter = DeblockNonFilteredBandNewFilter_C;
  70. FilterHoriz_Simple = FilterHoriz_Simple_C;
  71. FilterVert_Simple = FilterVert_Simple_C;
  72. HorizontalLine_1_2_Scale = HorizontalLine_1_2_Scale_C;
  73. VerticalBand_1_2_Scale = VerticalBand_1_2_Scale_C;
  74. LastVerticalBand_1_2_Scale = LastVerticalBand_1_2_Scale_C;
  75. HorizontalLine_3_5_Scale = HorizontalLine_3_5_Scale_C;
  76. VerticalBand_3_5_Scale = VerticalBand_3_5_Scale_C;
  77. LastVerticalBand_3_5_Scale = LastVerticalBand_3_5_Scale_C;
  78. HorizontalLine_4_5_Scale = HorizontalLine_4_5_Scale_C;
  79. VerticalBand_4_5_Scale = VerticalBand_4_5_Scale_C;
  80. LastVerticalBand_4_5_Scale = LastVerticalBand_4_5_Scale_C;
  81. FilteringHoriz_8 = FilteringHoriz_8_C;
  82. FilteringVert_8 = FilteringVert_8_C;
  83. FilteringHoriz_12 = FilteringHoriz_12_C;
  84. FilteringVert_12 = FilteringVert_12_C;
  85. FastDeInterlace = CFastDeInterlace;
  86. ClampLevels = ClampLevels_C;
  87. PlaneAddNoise = PlaneAddNoise_C;
  88. }