delta-cfg.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) STMicroelectronics SA 2015
  4. * Author: Hugues Fruchet <hugues.fruchet@st.com> for STMicroelectronics.
  5. */
  6. #ifndef DELTA_CFG_H
  7. #define DELTA_CFG_H
  8. #define DELTA_FW_VERSION "21.1-3"
  9. #define DELTA_MIN_WIDTH 32
  10. #define DELTA_MAX_WIDTH 4096
  11. #define DELTA_MIN_HEIGHT 32
  12. #define DELTA_MAX_HEIGHT 2400
  13. /* DELTA requires a 32x32 pixels alignment for frames */
  14. #define DELTA_WIDTH_ALIGNMENT 32
  15. #define DELTA_HEIGHT_ALIGNMENT 32
  16. #define DELTA_DEFAULT_WIDTH DELTA_MIN_WIDTH
  17. #define DELTA_DEFAULT_HEIGHT DELTA_MIN_HEIGHT
  18. #define DELTA_DEFAULT_FRAMEFORMAT V4L2_PIX_FMT_NV12
  19. #define DELTA_DEFAULT_STREAMFORMAT V4L2_PIX_FMT_MJPEG
  20. #define DELTA_MAX_RESO (DELTA_MAX_WIDTH * DELTA_MAX_HEIGHT)
  21. /* guard value for number of access units */
  22. #define DELTA_MAX_AUS 10
  23. /* IP perf dependent, can be tuned */
  24. #define DELTA_PEAK_FRAME_SMOOTHING 2
  25. /*
  26. * guard output frame count:
  27. * - at least 1 frame needed for display
  28. * - at worst 21
  29. * ( max h264 dpb (16) +
  30. * decoding peak smoothing (2) +
  31. * user display pipeline (3) )
  32. */
  33. #define DELTA_MIN_FRAME_USER 1
  34. #define DELTA_MAX_DPB 16
  35. #define DELTA_MAX_FRAME_USER 3 /* platform/use-case dependent */
  36. #define DELTA_MAX_FRAMES (DELTA_MAX_DPB + DELTA_PEAK_FRAME_SMOOTHING +\
  37. DELTA_MAX_FRAME_USER)
  38. #if DELTA_MAX_FRAMES > VIDEO_MAX_FRAME
  39. #undef DELTA_MAX_FRAMES
  40. #define DELTA_MAX_FRAMES (VIDEO_MAX_FRAME)
  41. #endif
  42. /* extra space to be allocated to store codec specific data per frame */
  43. #define DELTA_MAX_FRAME_PRIV_SIZE 100
  44. /* PM runtime auto power-off after 5ms of inactivity */
  45. #define DELTA_HW_AUTOSUSPEND_DELAY_MS 5
  46. #define DELTA_MAX_DECODERS 10
  47. #ifdef CONFIG_VIDEO_STI_DELTA_MJPEG
  48. extern const struct delta_dec mjpegdec;
  49. #endif
  50. #endif /* DELTA_CFG_H */