Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
2.8 KiB

  1. /*********************************************************************
  2. Interlace.h
  3. Header file for interlace module.
  4. *********************************************************************/
  5. #ifndef _INTERLACE_H
  6. #define _INTERLACE_H
  7. #include "Image.h"
  8. #define NUM_PASSES 7
  9. #pragma pack(2) /* Apparently, this is reasonably important */
  10. /* The primary state data structure. */
  11. typedef struct
  12. {
  13. IFLCLASS Class;
  14. long iImageHeight;
  15. long iImageWidth;
  16. long cbPixelSize;
  17. long cScanBlocks;
  18. long cPassScanLines[NUM_PASSES];
  19. long cTotalScanLines;
  20. long iPass;
  21. long iPassLine;
  22. long iScanLine;
  23. long iImageLine;
  24. } ADAM7_STRUCT, *pADAM7_STRUCT;
  25. //************************************************************************************
  26. // Given an image described by the parameters of the ADAM7_STRUCT, calculate the
  27. // number of scan lines in the image file which has been interlaced using the Adam7
  28. // scheme.
  29. //************************************************************************************
  30. int iADAM7CalculateNumberOfScanLines(pADAM7_STRUCT ptAdam7);
  31. //************************************************************************************
  32. // Generate a deinterlaced DIB; i.e., each pixel is in BGR in the case
  33. // of RGB/RGBA image classes, and raster line data is stored in a contiguous block.
  34. //************************************************************************************
  35. // The CALLING application is responsible for deallocating the structure created by
  36. // this function.
  37. LPBYTE *ppbADAM7InitDIBPointers(LPBYTE pbDIB, pADAM7_STRUCT ptAdam7, DWORD cbImageLine);
  38. // The following returns TRUE if the scan line was an empty scan line.
  39. BOOL ADAM7AddRowToDIB(LPBYTE *ppbDIBPtrs, LPBYTE pbScanLine, pADAM7_STRUCT ptAdam7);
  40. //************************************************************************************
  41. //************************************************************************************
  42. // Generate a deinterlaced image; i.e., each pixel is in RGB in the case
  43. // of RGB/RGBA image classes, and raster line data may not necessarily be stored
  44. // in one contiguous block of memory.
  45. //************************************************************************************
  46. // The following returns TRUE if the scan line was an empty scan line.
  47. BOOL ADAM7AddRowToImageBuffer(LPBYTE ppbInmageBuffer[], LPBYTE pbScanLine, pADAM7_STRUCT ptAdam7);
  48. //************************************************************************************
  49. //************************************************************************************
  50. // Generate a deinterlaced alpha channel data block.
  51. //************************************************************************************
  52. BOOL ADAM7RMFDeinterlaceAlpha(LPWORD *ppwInterlaced, LPWORD *ppwDeinterlaced,
  53. IFL_ALPHA_CHANNEL_INFO *ptIFLAlphaInfo);
  54. #endif // _INTERLACE_H