vc1hwd_decoder.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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 : Top level interface for sequence and picture layer decoding
  17. --
  18. --------------------------------------------------------------------------------
  19. --
  20. -- Version control information, please leave untouched.
  21. --
  22. -- $RCSfile: vc1hwd_decoder.h,v $
  23. -- $Revision: 1.9 $
  24. -- $Date: 2010/02/25 12:30:24 $
  25. --
  26. ------------------------------------------------------------------------------*/
  27. #ifndef VC1HWD_DECODER_H
  28. #define VC1HWD_DECODER_H
  29. /*------------------------------------------------------------------------------
  30. Include headers
  31. ------------------------------------------------------------------------------*/
  32. #include "basetype.h"
  33. #include "vc1decapi.h"
  34. #include "vc1hwd_container.h"
  35. #include "vc1hwd_storage.h"
  36. #include "vc1hwd_util.h"
  37. #include "vc1hwd_stream.h"
  38. #include "vc1hwd_headers.h"
  39. /*------------------------------------------------------------------------------
  40. Module defines
  41. ------------------------------------------------------------------------------*/
  42. #define INVALID_ANCHOR_PICTURE ((u16x)(-1))
  43. #define MIN_PIC_WIDTH 48
  44. #define MIN_PIC_HEIGHT 48
  45. #define MAX_NUM_MBS ((1920>>4)*(1088>>4))
  46. /* enumerated return values of the functions */
  47. enum {
  48. VC1HWD_OK,
  49. VC1HWD_NOT_CODED_PIC,
  50. VC1HWD_PIC_RDY,
  51. VC1HWD_SEQ_HDRS_RDY,
  52. VC1HWD_ENTRY_POINT_HDRS_RDY,
  53. VC1HWD_END_OF_SEQ,
  54. VC1HWD_PIC_HDRS_RDY,
  55. VC1HWD_FIELD_HDRS_RDY,
  56. VC1HWD_ERROR,
  57. VC1HWD_METADATA_ERROR,
  58. VC1HWD_MEMORY_FAIL,
  59. VC1HWD_USER_DATA_RDY,
  60. VC1HWD_HDRS_ERROR
  61. };
  62. /*------------------------------------------------------------------------------
  63. Data types
  64. ------------------------------------------------------------------------------*/
  65. /*------------------------------------------------------------------------------
  66. Function prototypes
  67. ------------------------------------------------------------------------------*/
  68. u16x vc1hwdInit( const void *dwl, swStrmStorage_t *pStorage,
  69. const VC1DecMetaData *pMetaData,
  70. u32 numFrameBuffers );
  71. u16x vc1hwdDecode( decContainer_t *pDecCont,
  72. swStrmStorage_t *pStorage,
  73. strmData_t *strmData );
  74. u16x vc1hwdRelease( const void *dwl, swStrmStorage_t *pStorage );
  75. u16x vc1hwdUnpackMetaData( const u8 *pBuffer, VC1DecMetaData *MetaData );
  76. void vc1hwdErrorConcealment( const u16x flush,
  77. swStrmStorage_t * pStorage );
  78. u16x vc1hwdNextPicture( swStrmStorage_t * pStorage, u16x * pNextPicture,
  79. u32* pFieldToRet, u16x endOfStream, u32 deinterlace,
  80. u32* pPicId, u32* errMbs );
  81. u16x vc1hwdBufferPicture( swStrmStorage_t * pStorage, u16x picToBuffer,
  82. u16x bufferB, u16x picId, u16x errMbs );
  83. u32 vc1hwdSeekFrameStart( swStrmStorage_t * pStorage,
  84. strmData_t *pStrmData );
  85. void vc1hwdSetPictureInfo( decContainer_t *pDecCont, u32 picId );
  86. void vc1hwdUpdateWorkBufferIndexes( swStrmStorage_t * pStorage, u32 isBPic );
  87. #endif /* #ifndef VC1HWD_DECODER_H */