mp4dechwd_storage.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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 : Stream decoding storage definition
  17. --
  18. --------------------------------------------------------------------------------
  19. --
  20. -- Version control information, please leave untouched.
  21. --
  22. -- $RCSfile: mp4dechwd_storage.h,v $
  23. -- $Date: 2010/03/31 08:54:59 $
  24. -- $Revision: 1.13 $
  25. --
  26. ------------------------------------------------------------------------------*/
  27. #ifndef DECSTRMSTORAGE_H_DEFINED
  28. #define DECSTRMSTORAGE_H_DEFINED
  29. #include "basetype.h"
  30. #include "mp4deccfg.h"
  31. #include "bqueue.h"
  32. #define CUSTOM_STRM_0 (3)
  33. #define CUSTOM_STRM_1 (4)
  34. #define CUSTOM_STRM_2 (5)
  35. typedef struct
  36. {
  37. u32 dataIndex;
  38. u32 picType;
  39. u32 picId;
  40. u32 isInter;
  41. MP4DecRet retVal;
  42. u32 nbrErrMbs;
  43. u32 sendToPp;
  44. MP4DecTime timeCode;
  45. } picture_t;
  46. typedef struct
  47. {
  48. u8 quantMat[64*2];
  49. u32 status; /* status of syncronization */
  50. u32 strmDecReady;
  51. u32 resyncMarkerLength;
  52. u32 vpMbNumber;
  53. u32 vpNumMbs;
  54. u32 vpFirstCodedMb;
  55. u32 qP;
  56. u32 prevQP;
  57. u32 vpQP;
  58. u32 skipB;
  59. u32 shortVideo;
  60. u32 mpeg4Video; /* Sequence contains mpeg-4 headers: either mpeg-4 or
  61. mpeg-4 short video */
  62. u32 gobResyncFlag;
  63. const u8 *pLastSync;
  64. /* pointer to stream buffer right after motion vectors of an intra macro
  65. * block. Needed to avoid decoding motion vectors twice in case decoder
  66. * runs out of rlc buffer (decoding twice means using results of previous
  67. * decoding in motion vector differential decoding) */
  68. u8 *pStrmAfterMv;
  69. u32 bitPosAfterMv;
  70. u32 readBitsAfterMv;
  71. u32 startCodeLoss;
  72. u32 validVopHeader;
  73. /* to be added to TicsFromPrev (to accommodate modulo time base changes
  74. * caused by GOV time codes) */
  75. u32 govTimeIncrement;
  76. u32 numErrMbs;
  77. /* 6 lsbs represent status for each block, msb high if mb not coded */
  78. u8 codedBits[MP4API_DEC_MBS];
  79. DWLLinearMem_t quantMatLinear;
  80. DWLLinearMem_t directMvs;
  81. picture_t pPicBuf[16];
  82. DWLLinearMem_t data[16];
  83. u32 outBuf[16];
  84. u32 outIndex;
  85. u32 outCount;
  86. u32 workOut;
  87. u32 work0;
  88. u32 work1;
  89. u32 latestId; /* current pic id, used for debug */
  90. u32 previousNotCoded;
  91. u32 previousB;
  92. u32 sorensonSpark;
  93. u32 sorensonVer;
  94. u32 disposable; /* sorenson */
  95. u32 customStrmVer;
  96. u32 customStrmHeaders;
  97. u32 customIdct;
  98. u32 customOverfill;
  99. u32 unsupportedFeaturesPresent;
  100. /* these are used to check if re-initialization is needed */
  101. u32 lowDelay;
  102. u32 videoObjectLayerWidth;
  103. u32 videoObjectLayerHeight;
  104. u8 lastPacketByte; /* last byte of last decoded packet. used to check
  105. * against clumsily stuffed short video end markers */
  106. u32 intraFreeze;
  107. u32 pictureBroken;
  108. u32 previousModeFull;
  109. u32 prevBIdx;
  110. u32 maxNumBuffers;
  111. u32 numBuffers;
  112. u32 numPpBuffers;
  113. bufferQueue_t bq;
  114. bufferQueue_t bqPp; /* for multi-buffer PP */
  115. } DecStrmStorage;
  116. #endif