csi_venc_mjpeg.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Copyright (C) 2021 Alibaba Group Holding Limited
  3. * Author: LuChongzhi <chongzhi.lcz@alibaba-inc.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. */
  9. #ifndef __CSI_VENC_MJPEG_H__
  10. #define __CSI_VENC_MJPEG_H__
  11. typedef struct csi_venc_mpf_cfg
  12. {
  13. uint8_t large_thumbnail_count; /* Range:[0,2]; the large thumbnail pic num of the MPF */
  14. csi_size_s large_thumbnail_size[2]; /* The resolution of large ThumbNail*/
  15. } csi_venc_mpf_cfg_s;
  16. /*the attribute of jpeg */
  17. typedef struct csi_venc_jpeg_attr {
  18. bool support_dcf; /* Range:[0,1]; support dcf */
  19. csi_venc_mpf_cfg_s mpf_cfg; /* Range:[0,1]; config of Mpf*/
  20. } csi_venc_jpeg_attr_s;
  21. /*the attribute of mjpeg */
  22. typedef struct csi_venc_mjpeg_attr {
  23. // reserve
  24. } csi_venc_mjpeg_attr_s;
  25. typedef struct csi_venc_mjpeg_cbr {
  26. uint32_t stat_time; /* Range:[1, 60]; the rate statistic time, the unit is senconds(s) */
  27. uint32_t framerate_numer;
  28. uint32_t framerate_denom;
  29. uint32_t bit_rate; /* Range:[2, 409600]; average bitrate, units:kbps */
  30. } csi_venc_mjpeg_cbr_s;
  31. typedef struct csi_venc_mjpeg_vbr {
  32. uint32_t stat_time; /* Range:[1, 60]; the rate statistic time, the unit is senconds(s) */
  33. uint32_t framerate_numer;
  34. uint32_t framerate_denom;
  35. uint32_t max_bit_rate; /* Range:[2, 409600]; average bitrate, units:kbps */
  36. } csi_venc_mjpeg_vbr_s;
  37. typedef struct csi_venc_mjpeg_fixqp {
  38. uint32_t framerate_numer;
  39. uint32_t framerate_denom;
  40. uint32_t q_factor; /* Range:[1,99];image quality. */
  41. } csi_venc_mjpeg_fixqp_s;
  42. typedef enum csi_venc_jpeg_pack {
  43. CSI_VENC_JPEG_PACK_ECS, /*ECS types*/
  44. CSI_VENC_JPEG_PACK_APP, /*APP types*/
  45. CSI_VENC_JPEG_PACK_VDO, /*VDO types*/
  46. CSI_VENC_JPEG_PACK_PIC, /*PIC types*/
  47. } csi_venc_jpeg_pack_e;
  48. #endif /* __CSI_VENC_MJPEG_H__ */