H264Instance.h 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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 : Encoder instance
  17. --
  18. ------------------------------------------------------------------------------*/
  19. #ifndef __H264_INSTANCE_H__
  20. #define __H264_INSTANCE_H__
  21. /*------------------------------------------------------------------------------
  22. 1. Include headers
  23. ------------------------------------------------------------------------------*/
  24. #include "enccommon.h"
  25. #include "encpreprocess.h"
  26. #include "encasiccontroller.h"
  27. #include "h264encapi.h" /* Callback type from API is reused */
  28. #include "H264NalUnit.h"
  29. #include "H264SequenceParameterSet.h"
  30. #include "H264PictureParameterSet.h"
  31. #include "H264Slice.h"
  32. #include "H264RateControl.h"
  33. #include "H264Mad.h"
  34. #ifdef VIDEOSTAB_ENABLED
  35. #include "vidstabcommon.h"
  36. #endif
  37. /*------------------------------------------------------------------------------
  38. 2. External compiler flags
  39. --------------------------------------------------------------------------------
  40. --------------------------------------------------------------------------------
  41. 3. Module defines
  42. ------------------------------------------------------------------------------*/
  43. enum H264EncStatus
  44. {
  45. H264ENCSTAT_INIT = 0xA1,
  46. H264ENCSTAT_START_STREAM,
  47. H264ENCSTAT_START_FRAME,
  48. H264ENCSTAT_ERROR
  49. };
  50. typedef struct
  51. {
  52. u32 encStatus;
  53. u32 mbPerFrame;
  54. u32 mbPerRow;
  55. u32 mbPerCol;
  56. u32 frameCnt;
  57. u32 fillerNalSize;
  58. u32 testId;
  59. u32 numViews;
  60. u32 numRefBuffsLum;
  61. u32 numRefBuffsChr;
  62. stream_s stream;
  63. preProcess_s preProcess;
  64. sps_s seqParameterSet;
  65. pps_s picParameterSet;
  66. slice_s slice;
  67. mvc_s mvc;
  68. h264RateControl_s rateControl;
  69. madTable_s mad;
  70. asicData_s asic;
  71. i32 naluOffset; /* Start offset for NAL unit size table */
  72. i32 numNalus; /* Number of NAL units created */
  73. H264EncSliceReadyCallBackFunc sliceReadyCbFunc;
  74. u32 *pOutBuf; /* User given stream output buffer */
  75. void *pAppData; /* User given application specific data */
  76. const void *inst;
  77. #ifdef VIDEOSTAB_ENABLED
  78. HWStabData vsHwData;
  79. SwStbData vsSwData;
  80. #endif
  81. } h264Instance_s;
  82. #endif