isp_venc_shake_hal.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * Copyright (c) 2021-2022 Alibaba Group. All rights reserved.
  3. * License-Identifier: Apache-2.0
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may
  6. * not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. #ifndef _ISP_VENC_SHAKE_HAL_H_
  18. #define _ISP_VENC_SHAKE_HAL_H_
  19. #ifndef IVS_MODULE_PATH
  20. #define IVS_MODULE_PATH "/tmp/dev/theadivs"
  21. #endif
  22. typedef enum _IvsStatus
  23. {
  24. IVS_STATUS_OK = 0,
  25. IVS_STATUS_ERROR = -1,
  26. } IvsStatus;
  27. typedef enum _IvsState
  28. {
  29. IVS_STATE_IDLE,
  30. IVS_STATE_READY,
  31. IVS_STATE_RUNNING,
  32. IVS_STATE_ERROR
  33. } IvsState;
  34. typedef enum _IvsBufferMode
  35. {
  36. IVS_BUFFER_MODE_FRAME = 0,
  37. IVS_BUFFER_MODE_SLICE,
  38. IVS_BUFFER_MODE_MAX
  39. } IvsBufferMode;
  40. typedef enum _IvsEncoderFormat
  41. {
  42. IVS_ENCODER_FORMAT_H264 = 0,
  43. IVS_ENCODER_FORMAT_H265,
  44. IVS_ENCODER_FORMAT_MAX
  45. } IvsEncoderFormat;
  46. typedef struct _IvsConfig
  47. {
  48. IvsBufferMode mode;
  49. IvsEncoderFormat encode;
  50. unsigned int pic_width;
  51. unsigned int pic_height;
  52. unsigned int encode_width;
  53. unsigned int encode_height;
  54. unsigned int buffer_height; // valid in slice buffer mode only
  55. unsigned int stride_y;
  56. unsigned int stride_uv;
  57. unsigned int encode_x;
  58. unsigned int encode_y;
  59. } IvsConfig;
  60. IvsStatus createIspVencShake(void **ivs);
  61. IvsStatus configIspVencShake(void *ivs, IvsConfig *config);
  62. IvsStatus startIspVencShake(void *ivs);
  63. IvsStatus resetIspVencShake(void *ivs);
  64. IvsStatus getIspVencShakeState(void *ivs, int *state);
  65. void destroyIspVencShake(void *ivs);
  66. #endif /* !_ISP_VENC_SHAKE_HAL_H_ */