amvideo2.h 1.2 KB

1234567891011121314151617181920212223242526
  1. /*
  2. Some necessary macros are missing from mingw version. They are here.
  3. See https://github.com/ofTheo/videoInput/blob/master/videoInputSrcAndDemos/libs/DShow/Include/amvideo.h
  4. */
  5. //------------------------------------------------------------------------------
  6. // File: AMVideo.h
  7. //
  8. // Desc: Video related definitions and interfaces for ActiveMovie.
  9. //
  10. // Copyright (c) 1992 - 2001, Microsoft Corporation. All rights reserved.
  11. //------------------------------------------------------------------------------
  12. #define TRUECOLOR(pbmi) ((TRUECOLORINFO *)(((LPBYTE)&((pbmi)->bmiHeader)) \
  13. + (pbmi)->bmiHeader.biSize))
  14. #define COLORS(pbmi) ((RGBQUAD *)(((LPBYTE)&((pbmi)->bmiHeader)) \
  15. + (pbmi)->bmiHeader.biSize))
  16. #define SIZE_MASKS (iMASK_COLORS * sizeof(DWORD))
  17. #define SIZE_PREHEADER (FIELD_OFFSET(VIDEOINFOHEADER,bmiHeader))
  18. #define WIDTHBYTES(bits) ((DWORD)(((bits)+31) & (~31)) / 8)
  19. #define DIBWIDTHBYTES(bi) (DWORD)WIDTHBYTES((DWORD)(bi).biWidth * (DWORD)(bi).biBitCount)
  20. #define _DIBSIZE(bi) (DIBWIDTHBYTES(bi) * (DWORD)(bi).biHeight)
  21. #define DIBSIZE(bi) ((bi).biHeight < 0 ? (-1)*(_DIBSIZE(bi)) : _DIBSIZE(bi))
  22. #define PALETTISED(pbmi) ((pbmi)->bmiHeader.biBitCount <= iPALETTE)