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