postproc_if.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. /****************************************************************************
  2. *
  3. * Module Title : postproc_if.h
  4. *
  5. * Description : Post-processor interface header file.
  6. *
  7. ****************************************************************************/
  8. #ifndef __INC_POSTPROC_IF_H
  9. #define __INC_POSTPROC_IF_H
  10. /****************************************************************************
  11. * Header Files
  12. ****************************************************************************/
  13. #include "codec_common.h"
  14. #include "codec_common_interface.h"
  15. /****************************************************************************
  16. * Typedefs
  17. ****************************************************************************/
  18. typedef struct POSTPROC_INSTANCE * POSTPROC_INST;
  19. /****************************************************************************
  20. * Imported Functions.
  21. ****************************************************************************/
  22. extern void InitPostProcessing
  23. (
  24. UINT32 *DCQuantScaleV2p,
  25. UINT32 *DCQuantScaleUVp,
  26. UINT32 *DCQuantScaleV1p,
  27. UINT32 Version
  28. );
  29. extern void DeInitPostProcessing ();
  30. extern POSTPROC_INST CreatePostProcInstance
  31. (
  32. CONFIG_TYPE *ConfigurationInit // configuration to setup
  33. );
  34. extern void DeletePostProcInstance
  35. (
  36. POSTPROC_INST *pbi // postprocessor instance to delete
  37. );
  38. extern void SetPPInterlacedMode(POSTPROC_INST ppi, int Interlaced);
  39. extern void SetDeInterlaceMode(POSTPROC_INST ppi, int DeInterlaceMode);
  40. extern void SetAddNoiseMode(POSTPROC_INST ppi, int AddNoiseMode);
  41. extern void ChangePostProcConfiguration
  42. (
  43. POSTPROC_INST pbi, // postprocessor instance to use
  44. CONFIG_TYPE *Configuration // configuration to change to
  45. );
  46. extern void PostProcess
  47. (
  48. POSTPROC_INST pbi, // postprocessor instance to use
  49. INT32 Vp3VersionNo, // version of frame
  50. INT32 FrameType, // key or non key
  51. INT32 PostProcessingLevel, // level of post processing to perform
  52. INT32 FrameQIndex, // q index value used on passed in frame
  53. UINT8 *LastFrameRecon, // reconstruction buffer : passed in
  54. UINT8 *PostProcessBuffer, // postprocessing buffer : passed in
  55. UINT8 *FragInfo, // blocks coded : passed in
  56. UINT32 FragInfoElementSize, // size of each element
  57. UINT32 FragInfoCodedMask // mask to get at whether fragment is coded
  58. );
  59. extern void (*ClampLevels)
  60. (
  61. POSTPROC_INST pbi,
  62. INT32 BlackClamp, // number of values to clamp from 0
  63. INT32 WhiteClamp, // number of values to clamp from 255
  64. UINT8 *Src, // reconstruction buffer : passed in
  65. UINT8 *Dst // postprocessing buffer : passed in
  66. );
  67. extern void LoopFilter
  68. (
  69. POSTPROC_INST pbi, // postprocessor instance to use
  70. INT32 FrameQIndex, // q index value used on passed in frame
  71. UINT8 *LastFrameRecon, // reconstruction buffer : passed in
  72. UINT8 *PostProcessBuffer, // postprocessing buffer : passed in
  73. UINT8 *FragInfo, // blocks coded : passed in
  74. UINT32 FragInfoElementSize, // size of each element
  75. UINT32 FragInfoCodedMask // mask to get at whether fragment is coded
  76. );
  77. extern void ApplyReconLoopFilter
  78. (
  79. POSTPROC_INST pbi, // postprocessor instance to use
  80. INT32 FrameQIndex, // q index value used on passed in frame
  81. UINT8 *LastFrameRecon, // reconstruction buffer : passed in
  82. UINT8 *PostProcessBuffer, // postprocessing buffer : passed in
  83. UINT8 *FragInfo, // blocks coded : passed in
  84. UINT32 FragInfoElementSize, // size of each element
  85. UINT32 FragInfoCodedMask // mask to get at whether fragment is coded
  86. );
  87. extern void ScaleOrCenter
  88. (
  89. POSTPROC_INST pbi, // postprocessor instance to use
  90. UINT8 *FrameBuffer, // buffer to use passed in
  91. YUV_BUFFER_CONFIG * YuvConfig // size you want to output buffer to
  92. );
  93. /****************************************************************************
  94. * Exported Functions.
  95. ****************************************************************************/
  96. extern void UpdateUMVBorder
  97. (
  98. POSTPROC_INST pbi,
  99. UINT8 * DestReconPtr
  100. );
  101. extern void (*FilteringVert_12)
  102. (
  103. UINT32 QValue,
  104. UINT8 * Src,
  105. INT32 Pitch
  106. );
  107. extern void (*FilteringHoriz_12)
  108. (
  109. UINT32 QValue,
  110. UINT8 * Src,
  111. INT32 Pitch
  112. );
  113. extern void (*FilteringVert_8)
  114. (
  115. UINT32 QValue,
  116. UINT8 * Src,
  117. INT32 Pitch
  118. );
  119. extern void (*FilteringHoriz_8)
  120. (
  121. UINT32 QValue,
  122. UINT8 * Src,
  123. INT32 Pitch
  124. );
  125. extern void CopyFrame( POSTPROC_INST pbi, YUV_BUFFER_CONFIG *b, UINT8 *DestReconPtr);
  126. /****************************************************************************
  127. * Exported Data.
  128. ****************************************************************************/
  129. extern UINT8 LimitVal_VP31[VAL_RANGE * 3];
  130. #endif