h264hwd_asic.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. -- Description : Hardware interface read/write
  17. --
  18. ------------------------------------------------------------------------------
  19. --
  20. -- Version control information, please leave untouched.
  21. --
  22. -- $RCSfile: h264hwd_asic.h,v $
  23. -- $Revision: 1.2 $
  24. -- $Date: 2008/09/15 09:55:40 $
  25. --
  26. ------------------------------------------------------------------------------*/
  27. #ifndef __H264ASIC_H__
  28. #define __H264ASIC_H__
  29. #include "basetype.h"
  30. #include "dwl.h"
  31. #include "h264hwd_container.h"
  32. #include "h264hwd_storage.h"
  33. #define ASIC_MB_RLC_BUFFER_SIZE 880 /* bytes */
  34. #define ASIC_MB_CTRL_BUFFER_SIZE 8 /* bytes */
  35. #define ASIC_MB_MV_BUFFER_SIZE 64 /* bytes */
  36. #define ASIC_MB_I4X4_BUFFER_SIZE 8 /* bytes */
  37. #define ASIC_CABAC_INIT_BUFFER_SIZE 3680/* bytes */
  38. #define ASIC_SCALING_LIST_SIZE 6*16+2*64
  39. #define ASIC_POC_BUFFER_SIZE 34*4
  40. #define X170_DEC_TIMEOUT 0x00FFU
  41. #define X170_DEC_SYSTEM_ERROR 0x0FFFU
  42. #define X170_DEC_HW_RESERVED 0xFFFFU
  43. /* asic macroblock types */
  44. typedef enum H264AsicMbTypes
  45. {
  46. HW_P_16x16 = 0,
  47. HW_P_16x8 = 1,
  48. HW_P_8x16 = 2,
  49. HW_P_8x8 = 3,
  50. HW_I_4x4 = 4,
  51. HW_I_16x16 = 5,
  52. HW_I_PCM = 6,
  53. HW_P_SKIP = 7
  54. } H264AsicMbTypes_t;
  55. u32 AllocateAsicBuffers(decContainer_t * pDecCont,
  56. DecAsicBuffers_t * asicBuff, u32 mbs);
  57. void ReleaseAsicBuffers(const void *dwl, DecAsicBuffers_t * asicBuff);
  58. void PrepareIntra4x4ModeData(storage_t * pStorage,
  59. DecAsicBuffers_t * pAsicBuff);
  60. void PrepareMvData(storage_t * pStorage, DecAsicBuffers_t * pAsicBuff);
  61. void PrepareRlcCount(storage_t * pStorage, DecAsicBuffers_t * pAsicBuff);
  62. void H264SetupVlcRegs(decContainer_t * pDecCont);
  63. void H264InitRefPicList(decContainer_t *pDecCont);
  64. u32 H264RunAsic(decContainer_t * pDecCont, DecAsicBuffers_t * pAsicBuff);
  65. #endif /* __H264ASIC_H__ */