Leaked source code of windows server 2003
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.

75 lines
2.3 KiB

  1. // $Header: G:/SwDev/WDM/Video/bt848/rcs/Risceng.cpp 1.6 1998/04/29 22:43:37 tomz Exp $
  2. #include "risceng.h"
  3. /* Method: RISCEng::CreateProgram
  4. * Purpose: Creates a first RISC program for a stream (field)
  5. * Input: aField: VidField - defines what field the program is for
  6. * ImageSize: SIZE & - defines dimentions of the image
  7. * dwPitch: DWORD - pitch to be used for data buffer . Useful for producing
  8. * interlaced images.
  9. * aFormat: ColorFormat - defines type of data
  10. * dwBufAddr: DWORD - address of the destination buffer
  11. * Output: RiscPrgHandle
  12. */
  13. RiscPrgHandle RISCEng::CreateProgram( MSize &ImageSize, DWORD dwPitch,
  14. ColFmt aFormat, DataBuf &buf, bool Intr, DWORD dwPlanrAdjust, bool rsync )
  15. {
  16. // create yet another risc program object
  17. RISCProgram *YAProgram =
  18. new RISCProgram( ImageSize, dwPitch, aFormat );
  19. // and make it create the program itself
  20. if ( YAProgram->Create( Intr, buf, dwPlanrAdjust, rsync ) != Success ) {
  21. delete YAProgram;
  22. YAProgram = NULL;
  23. }
  24. return YAProgram;
  25. }
  26. /* Method: RISCEng::DestroyProgram
  27. * Purpose: Removes a program from a chain and destroy it
  28. * Input: ToDie: RiscPrgHandle - pointer to a program to destroy
  29. * Output: None
  30. */
  31. void RISCEng::DestroyProgram( RiscPrgHandle ToDie )
  32. {
  33. delete ToDie;
  34. }
  35. /* Method: RISCEng::ChangeAddress
  36. * Purpose:
  37. * Input:
  38. * Output:
  39. */
  40. void RISCEng::ChangeAddress( RiscPrgHandle prog, DataBuf &buf )
  41. {
  42. prog->ChangeAddress( buf );
  43. }
  44. /* Method: RISCEng::Chain
  45. * Purpose: Chains two RISC programs together
  46. * Input: hParent: RiscPrgHandle - pointer in reality
  47. * hChild: RiscPrgHandle - pointer in reality
  48. * Output: None
  49. */
  50. void RISCEng::Chain( RiscPrgHandle hParent, RiscPrgHandle hChild , int ndxParent, int ndxChild)
  51. {
  52. DebugOut((2, "*** Linked hParent(%x)(%d) to hChild(%x)(%d)\n", hParent, ndxParent, hChild, ndxChild));
  53. hParent->SetChain( hChild );
  54. }
  55. /* Method: RISCEng::Skip
  56. * Purpose: Sets the given program so it is bypassed by DMA
  57. * Input: hToSkip: RiscPrgHandle - pointer in reality
  58. * Output: None
  59. * Note: The way things are right now a program will always have a child and a
  60. * parent, even if it is its own parent and child
  61. */
  62. void RISCEng::Skip( RiscPrgHandle pToSkip )
  63. {
  64. pToSkip->Skip();
  65. }