mpeg2decapi_internal.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*------------------------------------------------------------------------------
  2. -- --
  3. -- This software is confidential and proprietary and may be used --
  4. -- only as expressly authorized by a licensing agreement from --
  5. -- --
  6. -- Hantro Products Oy. --
  7. -- --
  8. -- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
  9. -- ALL RIGHTS RESERVED --
  10. -- --
  11. -- The entire notice above must be reproduced --
  12. -- on all copies and should not be removed. --
  13. -- --
  14. --------------------------------------------------------------------------------
  15. --
  16. -- Abstract: api internal defines
  17. --
  18. --------------------------------------------------------------------------------
  19. --
  20. -- Version control information, please leave untouched.
  21. --
  22. -- $RCSfile: mpeg2decapi_internal.h,v $
  23. -- $Date: 2008/10/31 14:58:49 $
  24. -- $Revision: 1.8 $
  25. ------------------------------------------------------------------------------*/
  26. /*------------------------------------------------------------------------------
  27. Table of contents
  28. 1. Include headers
  29. 2. Internal Definitions
  30. 3. Prototypes of Decoder API internal functions
  31. ------------------------------------------------------------------------------*/
  32. #ifndef _MPEG2DECAPI_INTERNAL_H_
  33. #define _MPEG2DECAPI_INTERNAL_H_
  34. /*------------------------------------------------------------------------------
  35. 1. Include headers
  36. ------------------------------------------------------------------------------*/
  37. #include "mpeg2hwd_cfg.h"
  38. #include "mpeg2hwd_utils.h"
  39. #include "mpeg2decapi.h"
  40. /*------------------------------------------------------------------------------
  41. 2. Internal Definitions
  42. ------------------------------------------------------------------------------*/
  43. #define MPEG2_DEC_X170_MODE_MPEG2 5
  44. #define MPEG2_DEC_X170_MODE_MPEG1 6
  45. #define MPEG2_DEC_X170_IRQ_DEC_RDY 0x01
  46. #define MPEG2_DEC_X170_IRQ_BUS_ERROR 0x02
  47. #define MPEG2_DEC_X170_IRQ_BUFFER_EMPTY 0x04
  48. #define MPEG2_DEC_X170_IRQ_ASO 0x08
  49. #define MPEG2_DEC_X170_IRQ_STREAM_ERROR 0x10
  50. #define MPEG2_DEC_X170_IRQ_TIMEOUT 0x40
  51. #define MPEG2_DEC_X170_IRQ_CLEAR_ALL 0xFF
  52. /*
  53. * Size of internal frame buffers (in 32bit-words) per macro block
  54. */
  55. #define MPEG2API_DEC_FRAME_BUFF_SIZE 96
  56. /*
  57. * Size of CTRL buffer (macroblks * 4 * 32bit-words/Mb), same for MV and DC
  58. */
  59. #define MPEG2API_DEC_CTRL_BUFF_SIZE NBR_OF_WORDS_MB * MPEG2API_DEC_MBS
  60. #define MPEG2API_DEC_MV_BUFF_SIZE NBR_MV_WORDS_MB * MPEG2API_DEC_MBS
  61. #define MPEG2API_DEC_DC_BUFF_SIZE NBR_DC_WORDS_MB * MPEG2API_DEC_MBS
  62. #define MPEG2API_DEC_NBOFRLC_BUFF_SIZE MPEG2API_DEC_MBS * 6
  63. #ifndef NULL
  64. #define NULL 0
  65. #endif
  66. #define SWAP_POINTERS(A, B, T) T = A; A = B; B = T;
  67. #define INVALID_ANCHOR_PICTURE ((u32)-1)
  68. /*------------------------------------------------------------------------------
  69. 3. Prototypes of Decoder API internal functions
  70. ------------------------------------------------------------------------------*/
  71. /*void regDump(Mpeg2DecInst decInst);*/
  72. void mpeg2API_InitDataStructures(DecContainer * pDecCont);
  73. void mpeg2DecTimeCode(DecContainer * pDecCont, Mpeg2DecTime * timeCode);
  74. Mpeg2DecRet mpeg2AllocateBuffers(DecContainer * pDecCont);
  75. void mpeg2HandleQTables(DecContainer * pDecCont);
  76. void mpeg2HandleMpeg1Parameters(DecContainer * pDecCont);
  77. Mpeg2DecRet mpeg2DecCheckSupport(DecContainer * pDecCont);
  78. void mpeg2DecPreparePicReturn(DecContainer * pDecCont);
  79. void mpeg2DecAspectRatio(DecContainer * pDecCont, Mpeg2DecInfo * pDecInfo);
  80. void mpeg2DecBufferPicture(DecContainer * pDecCont, u32 picId, u32 bufferB,
  81. u32 isInter, Mpeg2DecRet returnValue, u32 nbrErrMbs);
  82. Mpeg2DecRet mpeg2DecAllocExtraBPic(DecContainer * pDecCont);
  83. void mpeg2FreeBuffers(DecContainer * pDecCont);
  84. #endif /* _MPEG2DECAPI_INTERNAL_H_ */