SF_OMX_video_common.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (C) 2021 StarFive Technology Co., Ltd.
  4. */
  5. #ifndef SF_OMX_VIDEO_COMMON
  6. #define SF_OMX_VIDEO_COMMON
  7. #include "OMX_Component.h"
  8. #include "OMX_Video.h"
  9. #include "OMX_VideoExt.h"
  10. #include "OMX_Index.h"
  11. #include "OMX_IndexExt.h"
  12. #include "SF_OMX_Core.h"
  13. #include "component.h"
  14. #define INIT_SET_SIZE_VERSION(_struct_, _structType_) \
  15. do \
  16. { \
  17. memset((_struct_), 0, sizeof(_structType_)); \
  18. (_struct_)->nSize = sizeof(_structType_); \
  19. (_struct_)->nVersion.s.nVersionMajor = 1; \
  20. (_struct_)->nVersion.s.nVersionMinor = 18; \
  21. (_struct_)->nVersion.s.nRevision = 1; \
  22. (_struct_)->nVersion.s.nStep = 0; \
  23. } while (0)
  24. #define DEFAULT_FRAME_WIDTH 3840
  25. #define DEFAULT_FRAME_HEIGHT 2160
  26. #define DEFAULT_VIDEO_INPUT_BUFFER_SIZE (DEFAULT_FRAME_WIDTH * DEFAULT_FRAME_HEIGHT) / 2
  27. #define DEFAULT_VIDEO_OUTPUT_BUFFER_SIZE (DEFAULT_FRAME_WIDTH * DEFAULT_FRAME_HEIGHT * 3) / 2
  28. #ifdef __cplusplus
  29. extern "C"
  30. {
  31. #endif
  32. BOOL CheckEncTestConfig(TestEncConfig *testConfig);
  33. BOOL CheckDecTestConfig(TestDecConfig *testConfig);
  34. OMX_ERRORTYPE GetStateCommon(OMX_IN OMX_HANDLETYPE hComponent, OMX_OUT OMX_STATETYPE *pState);
  35. OMX_ERRORTYPE InitComponentStructorCommon(SF_OMX_COMPONENT *hComponent);
  36. OMX_ERRORTYPE ComponentClearCommon(SF_OMX_COMPONENT *hComponent);
  37. OMX_ERRORTYPE FlushBuffer(SF_OMX_COMPONENT *pSfOMXComponent, OMX_U32 nPort);
  38. #ifdef __cplusplus
  39. }
  40. #endif
  41. #endif