+};
+
+static struct msm_platform_inst_capability instance_cap_data_sm8550[] = {
+ /* {cap, domain, codec,
+ * min, max, step_or_mask, value,
+ * v4l2_id,
+ * hfi_id,
+ * flags}
+ */
+ {FRAME_WIDTH, DEC, CODECS_ALL, 96, 8192, 1, 1920},
+
+ {FRAME_WIDTH, DEC, VP9, 96, 4096, 1, 1920},
+
+ {FRAME_WIDTH, ENC, CODECS_ALL, 128, 8192, 1, 1920},
+
+ {FRAME_WIDTH, ENC, HEVC, 96, 8192, 1, 1920},
+
+ {LOSSLESS_FRAME_WIDTH, ENC, CODECS_ALL, 128, 4096, 1, 1920},
+
+ {LOSSLESS_FRAME_WIDTH, ENC, HEVC, 96, 4096, 1, 1920},
+
+ {FRAME_HEIGHT, DEC, CODECS_ALL, 96, 8192, 1, 1080},
+
+ {FRAME_HEIGHT, DEC, VP9, 96, 4096, 1, 1080},
+
+ {FRAME_HEIGHT, ENC, CODECS_ALL, 128, 8192, 1, 1080},
+
+ {FRAME_HEIGHT, ENC, HEVC, 96, 8192, 1, 1080},
+
+ {LOSSLESS_FRAME_HEIGHT, ENC, CODECS_ALL, 128, 4096, 1, 1080},
+
+ {LOSSLESS_FRAME_HEIGHT, ENC, HEVC, 96, 4096, 1, 1080},
+
+ {PIX_FMTS, ENC | DEC, H264,
+ MSM_VIDC_FMT_NV12,
+ MSM_VIDC_FMT_NV12C,
+ MSM_VIDC_FMT_NV12 | MSM_VIDC_FMT_NV21 | MSM_VIDC_FMT_NV12C,
+ MSM_VIDC_FMT_NV12C},
+
+ {PIX_FMTS, ENC | DEC, HEVC | VP9,
+ MSM_VIDC_FMT_NV12,
+ MSM_VIDC_FMT_TP10C,
+ MSM_VIDC_FMT_NV12 | MSM_VIDC_FMT_NV21 | MSM_VIDC_FMT_NV12C |
+ MSM_VIDC_FMT_TP10C,
+ MSM_VIDC_FMT_NV12C},
+
+ {MIN_BUFFERS_INPUT, ENC | DEC, CODECS_ALL, 0, 64, 1, 4,
+ V4L2_CID_MIN_BUFFERS_FOR_OUTPUT,
+ 0,
+ CAP_FLAG_VOLATILE},
+
+ {MIN_BUFFERS_OUTPUT, ENC | DEC, CODECS_ALL,
+ 0, 64, 1, 4,
+ V4L2_CID_MIN_BUFFERS_FOR_CAPTURE,
+ HFI_PROP_BUFFER_FW_MIN_OUTPUT_COUNT,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_VOLATILE},
+
+ /* (8192 * 4320) / 256 */
+ {MBPF, ENC, CODECS_ALL, 64, 138240, 1, 138240},
+
+ {MBPF, ENC, HEVC, 36, 138240, 1, 138240},
+
+ {MBPF, DEC, CODECS_ALL, 36, 138240, 1, 138240},
+
+ /* (4096 * 2304) / 256 */
+ {MBPF, DEC, VP9, 36, 36864, 1, 36864},
+
+ /* (4096 * 2304) / 256 */
+ {LOSSLESS_MBPF, ENC, H264 | HEVC, 64, 36864, 1, 36864},
+
+ /* Batch Mode Decode */
+ /* TODO: update with new values based on updated voltage corner */
+ {BATCH_MBPF, DEC, H264 | HEVC | VP9, 64, 34816, 1, 34816},
+
+ /* (4096 * 2304) / 256 */
+ {BATCH_FPS, DEC, H264 | HEVC | VP9, 1, 120, 1, 120},
+
+ {FRAME_RATE, ENC | DEC, CODECS_ALL,
+ (MINIMUM_FPS << 16), (MAXIMUM_FPS << 16),
+ 1, (DEFAULT_FPS << 16),
+ 0,
+ HFI_PROP_FRAME_RATE,
+ CAP_FLAG_OUTPUT_PORT},
+
+ {OPERATING_RATE, ENC | DEC, CODECS_ALL,
+ (MINIMUM_FPS << 16), (MAXIMUM_FPS << 16),
+ 1, (DEFAULT_FPS << 16)},
+
+ {INPUT_RATE, ENC | DEC, CODECS_ALL,
+ (MINIMUM_FPS << 16), INT_MAX,
+ 1, (DEFAULT_FPS << 16)},
+
+ {TIMESTAMP_RATE, ENC | DEC, CODECS_ALL,
+ (MINIMUM_FPS << 16), INT_MAX,
+ 1, (DEFAULT_FPS << 16)},
+
+ {SCALE_FACTOR, ENC, H264 | HEVC, 1, 8, 1, 8},
+
+ {MB_CYCLES_VSP, ENC, CODECS_ALL, 25, 25, 1, 25},
+
+ {MB_CYCLES_VSP, DEC, CODECS_ALL, 25, 25, 1, 25},
+
+ {MB_CYCLES_VSP, DEC, VP9, 60, 60, 1, 60},
+
+ {MB_CYCLES_VPP, ENC, CODECS_ALL, 675, 675, 1, 675},
+
+ {MB_CYCLES_VPP, DEC, CODECS_ALL, 200, 200, 1, 200},
+
+ {MB_CYCLES_LP, ENC, CODECS_ALL, 320, 320, 1, 320},
+
+ {MB_CYCLES_LP, DEC, CODECS_ALL, 200, 200, 1, 200},
+
+ {MB_CYCLES_FW, ENC | DEC, CODECS_ALL, 489583, 489583, 1, 489583},
+
+ {MB_CYCLES_FW_VPP, ENC, CODECS_ALL, 48405, 48405, 1, 48405},
+
+ {MB_CYCLES_FW_VPP, DEC, CODECS_ALL, 66234, 66234, 1, 66234},
+
+ {HFLIP, ENC, CODECS_ALL,
+ 0, 1, 1, 0,
+ V4L2_CID_HFLIP,
+ HFI_PROP_FLIP,
+ CAP_FLAG_OUTPUT_PORT |
+ CAP_FLAG_INPUT_PORT | CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {VFLIP, ENC, CODECS_ALL,
+ 0, 1, 1, 0,
+ V4L2_CID_VFLIP,
+ HFI_PROP_FLIP,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {ROTATION, ENC, CODECS_ALL,
+ 0, 270, 90, 0,
+ V4L2_CID_ROTATE,
+ HFI_PROP_ROTATION,
+ CAP_FLAG_OUTPUT_PORT},
+
+ {HEADER_MODE, ENC, CODECS_ALL,
+ V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE,
+ V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME,
+ BIT(V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE) |
+ BIT(V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME),
+ V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE,
+ V4L2_CID_MPEG_VIDEO_HEADER_MODE,
+ HFI_PROP_SEQ_HEADER_MODE,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU},
+
+ {PREPEND_SPSPPS_TO_IDR, ENC, CODECS_ALL,
+ 0, 1, 1, 0,
+ V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR},
+
+ {WITHOUT_STARTCODE, ENC, CODECS_ALL,
+ 0, 1, 1, 0,
+ V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE,
+ HFI_PROP_NAL_LENGTH_FIELD,
+ CAP_FLAG_OUTPUT_PORT},
+
+ {NAL_LENGTH_FIELD, ENC, CODECS_ALL,
+ V4L2_MPEG_VIDEO_HEVC_SIZE_0,
+ V4L2_MPEG_VIDEO_HEVC_SIZE_4,
+ BIT(V4L2_MPEG_VIDEO_HEVC_SIZE_0) |
+ BIT(V4L2_MPEG_VIDEO_HEVC_SIZE_4),
+ V4L2_MPEG_VIDEO_HEVC_SIZE_0,
+ V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD,
+ HFI_PROP_NAL_LENGTH_FIELD,
+ CAP_FLAG_MENU | CAP_FLAG_OUTPUT_PORT},
+
+ /* TODO: Firmware introduced enumeration type for this
+ * with and without seq header.
+ */
+ {REQUEST_I_FRAME, ENC, H264 | HEVC,
+ 0, 0, 0, 0,
+ V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME,
+ HFI_PROP_REQUEST_SYNC_FRAME,
+ CAP_FLAG_INPUT_PORT | CAP_FLAG_DYNAMIC_ALLOWED},
+
+ /* Enc: Keeping CABAC and CAVLC as same bitrate.
+ * Dec: there's no use of Bitrate cap
+ */
+ {BIT_RATE, ENC, H264 | HEVC,
+ 1, MAX_BITRATE, 1, DEFAULT_BITRATE,
+ V4L2_CID_MPEG_VIDEO_BITRATE,
+ HFI_PROP_TOTAL_BITRATE,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {BITRATE_MODE, ENC, H264,
+ V4L2_MPEG_VIDEO_BITRATE_MODE_VBR,
+ V4L2_MPEG_VIDEO_BITRATE_MODE_CBR,
+ BIT(V4L2_MPEG_VIDEO_BITRATE_MODE_VBR) |
+ BIT(V4L2_MPEG_VIDEO_BITRATE_MODE_CBR),
+ V4L2_MPEG_VIDEO_BITRATE_MODE_VBR,
+ V4L2_CID_MPEG_VIDEO_BITRATE_MODE,
+ HFI_PROP_RATE_CONTROL,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU},
+
+ {BITRATE_MODE, ENC, HEVC,
+ V4L2_MPEG_VIDEO_BITRATE_MODE_VBR,
+ V4L2_MPEG_VIDEO_BITRATE_MODE_CQ,
+ BIT(V4L2_MPEG_VIDEO_BITRATE_MODE_VBR) |
+ BIT(V4L2_MPEG_VIDEO_BITRATE_MODE_CBR) |
+ BIT(V4L2_MPEG_VIDEO_BITRATE_MODE_CQ),
+ V4L2_MPEG_VIDEO_BITRATE_MODE_VBR,
+ V4L2_CID_MPEG_VIDEO_BITRATE_MODE,
+ HFI_PROP_RATE_CONTROL,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU},
+
+ {CABAC_MAX_BITRATE, ENC, H264 | HEVC, 0,
+ 160000000, 1, 160000000},
+
+ {CAVLC_MAX_BITRATE, ENC, H264, 0,
+ 220000000, 1, 220000000},
+
+ {ALLINTRA_MAX_BITRATE, ENC, H264 | HEVC, 0,
+ 245000000, 1, 245000000},
+
+ {NUM_COMV, DEC, CODECS_ALL,
+ 0, INT_MAX, 1, 0},
+
+ {LOSSLESS, ENC, HEVC,
+ 0, 1, 1, 0,
+ V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU},
+
+ {FRAME_SKIP_MODE, ENC, H264 | HEVC,
+ V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_DISABLED,
+ V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT,
+ BIT(V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_DISABLED) |
+ BIT(V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT) |
+ BIT(V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT),
+ V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_DISABLED,
+ V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE,
+ 0,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU},
+
+ {FRAME_RC_ENABLE, ENC, H264 | HEVC,
+ 0, 1, 1, 1,
+ V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE},
+
+ {CONSTANT_QUALITY, ENC, HEVC,
+ 1, MAX_CONSTANT_QUALITY, 1, 90,
+ V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY,
+ HFI_PROP_CONSTANT_QUALITY,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {GOP_SIZE, ENC, CODECS_ALL,
+ 0, INT_MAX, 1, 2 * DEFAULT_FPS - 1,
+ V4L2_CID_MPEG_VIDEO_GOP_SIZE,
+ HFI_PROP_MAX_GOP_FRAMES,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {GOP_CLOSURE, ENC, H264 | HEVC,
+ 0, 1, 1, 1,
+ V4L2_CID_MPEG_VIDEO_GOP_CLOSURE,
+ 0},
+
+ {B_FRAME, ENC, H264 | HEVC,
+ 0, 7, 1, 0,
+ V4L2_CID_MPEG_VIDEO_B_FRAMES,
+ HFI_PROP_MAX_B_FRAMES,
+ CAP_FLAG_OUTPUT_PORT},
+
+ {LTR_COUNT, ENC, H264 | HEVC,
+ 0, MAX_LTR_FRAME_COUNT_2, 1, 0,
+ V4L2_CID_MPEG_VIDEO_LTR_COUNT,
+ HFI_PROP_LTR_COUNT,
+ CAP_FLAG_OUTPUT_PORT},
+
+ {USE_LTR, ENC, H264 | HEVC,
+ 0,
+ ((1 << MAX_LTR_FRAME_COUNT_2) - 1),
+ 0, 0,
+ V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES,
+ HFI_PROP_LTR_USE,
+ CAP_FLAG_INPUT_PORT | CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {MARK_LTR, ENC, H264 | HEVC,
+ INVALID_DEFAULT_MARK_OR_USE_LTR,
+ (MAX_LTR_FRAME_COUNT_2 - 1),
+ 1, INVALID_DEFAULT_MARK_OR_USE_LTR,
+ V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX,
+ HFI_PROP_LTR_MARK,
+ CAP_FLAG_INPUT_PORT | CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {BASELAYER_PRIORITY, ENC, H264,
+ 0, MAX_BASE_LAYER_PRIORITY_ID, 1, 0,
+ V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID,
+ HFI_PROP_BASELAYER_PRIORITYID,
+ CAP_FLAG_OUTPUT_PORT},
+
+ {IR_TYPE, ENC, H264 | HEVC,
+ V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_RANDOM,
+ V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_CYCLIC,
+ BIT(V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_RANDOM) |
+ BIT(V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_CYCLIC),
+ V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE_RANDOM,
+ V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE,
+ 0,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU},
+
+ {IR_PERIOD, ENC, H264 | HEVC,
+ 0, INT_MAX, 1, 0,
+ V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD,
+ 0,
+ CAP_FLAG_INPUT_PORT | CAP_FLAG_OUTPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {AU_DELIMITER, ENC, H264 | HEVC,
+ 0, 1, 1, 0,
+ V4L2_CID_MPEG_VIDEO_AU_DELIMITER,
+ HFI_PROP_AUD,
+ CAP_FLAG_OUTPUT_PORT},
+
+ {MIN_QUALITY, ENC, H264 | HEVC,
+ 0, MAX_SUPPORTED_MIN_QUALITY, 70, MAX_SUPPORTED_MIN_QUALITY,
+ 0,
+ HFI_PROP_MAINTAIN_MIN_QUALITY,
+ CAP_FLAG_OUTPUT_PORT},
+
+ {VBV_DELAY, ENC, H264 | HEVC,
+ 200, 300, 100, 300,
+ V4L2_CID_MPEG_VIDEO_VBV_DELAY,
+ HFI_PROP_VBV_DELAY,
+ CAP_FLAG_OUTPUT_PORT},
+
+ {PEAK_BITRATE, ENC, H264 | HEVC,
+ /* default peak bitrate is 10% larger than avg bitrate */
+ 1, MAX_BITRATE, 1, DEFAULT_BITRATE,
+ V4L2_CID_MPEG_VIDEO_BITRATE_PEAK,
+ HFI_PROP_TOTAL_PEAK_BITRATE,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {MIN_FRAME_QP, ENC, H264,
+ MIN_QP_8BIT, MAX_QP, 1, MIN_QP_8BIT,
+ V4L2_CID_MPEG_VIDEO_H264_MIN_QP,
+ HFI_PROP_MIN_QP_PACKED,
+ CAP_FLAG_OUTPUT_PORT},
+
+ {MIN_FRAME_QP, ENC, HEVC,
+ MIN_QP_10BIT, MAX_QP, 1, MIN_QP_10BIT,
+ V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP,
+ HFI_PROP_MIN_QP_PACKED,
+ CAP_FLAG_OUTPUT_PORT},
+
+ {I_FRAME_MIN_QP, ENC, H264,
+ MIN_QP_8BIT, MAX_QP, 1, MIN_QP_8BIT,
+ V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MIN_QP},
+
+ {I_FRAME_MIN_QP, ENC, HEVC,
+ MIN_QP_10BIT, MAX_QP, 1, MIN_QP_10BIT,
+ V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MIN_QP},
+
+ {P_FRAME_MIN_QP, ENC, H264,
+ MIN_QP_8BIT, MAX_QP, 1, MIN_QP_8BIT,
+ V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MIN_QP},
+
+ {P_FRAME_MIN_QP, ENC, HEVC,
+ MIN_QP_10BIT, MAX_QP, 1, MIN_QP_10BIT,
+ V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MIN_QP},
+
+ {B_FRAME_MIN_QP, ENC, H264,
+ MIN_QP_8BIT, MAX_QP, 1, MIN_QP_8BIT,
+ V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MIN_QP},
+
+ {B_FRAME_MIN_QP, ENC, HEVC,
+ MIN_QP_10BIT, MAX_QP, 1, MIN_QP_10BIT,
+ V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MIN_QP},
+
+ {MAX_FRAME_QP, ENC, H264,
+ MIN_QP_8BIT, MAX_QP, 1, MAX_QP,
+ V4L2_CID_MPEG_VIDEO_H264_MAX_QP,
+ HFI_PROP_MAX_QP_PACKED,
+ CAP_FLAG_OUTPUT_PORT},
+
+ {MAX_FRAME_QP, ENC, HEVC,
+ MIN_QP_10BIT, MAX_QP, 1, MAX_QP,
+ V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP,
+ HFI_PROP_MAX_QP_PACKED,
+ CAP_FLAG_OUTPUT_PORT},
+
+ {I_FRAME_MAX_QP, ENC, H264,
+ MIN_QP_8BIT, MAX_QP, 1, MAX_QP,
+ V4L2_CID_MPEG_VIDEO_H264_I_FRAME_MAX_QP},
+
+ {I_FRAME_MAX_QP, ENC, HEVC,
+ MIN_QP_10BIT, MAX_QP, 1, MAX_QP,
+ V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_MAX_QP},
+
+ {P_FRAME_MAX_QP, ENC, H264,
+ MIN_QP_8BIT, MAX_QP, 1, MAX_QP,
+ V4L2_CID_MPEG_VIDEO_H264_P_FRAME_MAX_QP},
+
+ {P_FRAME_MAX_QP, ENC, HEVC,
+ MIN_QP_10BIT, MAX_QP, 1, MAX_QP,
+ V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_MAX_QP},
+
+ {B_FRAME_MAX_QP, ENC, H264,
+ MIN_QP_8BIT, MAX_QP, 1, MAX_QP,
+ V4L2_CID_MPEG_VIDEO_H264_B_FRAME_MAX_QP},
+
+ {B_FRAME_MAX_QP, ENC, HEVC,
+ MIN_QP_10BIT, MAX_QP, 1, MAX_QP,
+ V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MAX_QP},
+
+ {I_FRAME_QP, ENC, HEVC,
+ MIN_QP_10BIT, MAX_QP, 1, DEFAULT_QP,
+ V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP,
+ HFI_PROP_QP_PACKED,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {I_FRAME_QP, ENC, H264,
+ MIN_QP_8BIT, MAX_QP, 1, DEFAULT_QP,
+ V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP,
+ HFI_PROP_QP_PACKED,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {P_FRAME_QP, ENC, HEVC,
+ MIN_QP_10BIT, MAX_QP, 1, DEFAULT_QP,
+ V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP,
+ HFI_PROP_QP_PACKED,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {P_FRAME_QP, ENC, H264,
+ MIN_QP_8BIT, MAX_QP, 1, DEFAULT_QP,
+ V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP,
+ HFI_PROP_QP_PACKED,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {B_FRAME_QP, ENC, HEVC,
+ MIN_QP_10BIT, MAX_QP, 1, DEFAULT_QP,
+ V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP,
+ HFI_PROP_QP_PACKED,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {B_FRAME_QP, ENC, H264,
+ MIN_QP_8BIT, MAX_QP, 1, DEFAULT_QP,
+ V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP,
+ HFI_PROP_QP_PACKED,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {LAYER_TYPE, ENC, HEVC,
+ V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B,
+ V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P,
+ BIT(V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B) |
+ BIT(V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P),
+ V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P,
+ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE,
+ HFI_PROP_LAYER_ENCODING_TYPE,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU},
+
+ {LAYER_TYPE, ENC, H264,
+ V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B,
+ V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P,
+ BIT(V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B) |
+ BIT(V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P),
+ V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P,
+ V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE,
+ HFI_PROP_LAYER_ENCODING_TYPE,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU},
+
+ {LAYER_ENABLE, ENC, H264,
+ 0, 1, 1, 0,
+ V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING,
+ HFI_PROP_LAYER_ENCODING_TYPE,
+ CAP_FLAG_OUTPUT_PORT},
+
+ {LAYER_ENABLE, ENC, HEVC,
+ 0, 1, 1, 0,
+ 0,
+ 0,
+ CAP_FLAG_OUTPUT_PORT},
+
+ {ENH_LAYER_COUNT, ENC, HEVC,
+ 0, 5, 1, 0,
+ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER,
+ HFI_PROP_LAYER_COUNT,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {ENH_LAYER_COUNT, ENC, H264,
+ 0, 5, 1, 0,
+ V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER,
+ HFI_PROP_LAYER_COUNT,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {L0_BR, ENC, H264,
+ 1, MAX_BITRATE, 1, DEFAULT_BITRATE,
+ V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L0_BR,
+ HFI_PROP_BITRATE_LAYER1,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {L0_BR, ENC, HEVC,
+ 1, MAX_BITRATE, 1, DEFAULT_BITRATE,
+ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR,
+ HFI_PROP_BITRATE_LAYER1,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {L1_BR, ENC, H264,
+ 1, MAX_BITRATE, 1, DEFAULT_BITRATE,
+ V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L1_BR,
+ HFI_PROP_BITRATE_LAYER2,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {L1_BR, ENC, HEVC,
+ 1, MAX_BITRATE, 1, DEFAULT_BITRATE,
+ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR,
+ HFI_PROP_BITRATE_LAYER2,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {L2_BR, ENC, H264,
+ 1, MAX_BITRATE, 1, DEFAULT_BITRATE,
+ V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L2_BR,
+ HFI_PROP_BITRATE_LAYER3,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {L2_BR, ENC, HEVC,
+ 1, MAX_BITRATE, 1, DEFAULT_BITRATE,
+ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR,
+ HFI_PROP_BITRATE_LAYER3,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {L3_BR, ENC, H264,
+ 1, MAX_BITRATE, 1, DEFAULT_BITRATE,
+ V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L3_BR,
+ HFI_PROP_BITRATE_LAYER4,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+ {L3_BR, ENC, HEVC,
+ 1, MAX_BITRATE, 1, DEFAULT_BITRATE,
+ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR,
+ HFI_PROP_BITRATE_LAYER4,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {L4_BR, ENC, H264,
+ 1, MAX_BITRATE, 1, DEFAULT_BITRATE,
+ V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L4_BR,
+ HFI_PROP_BITRATE_LAYER5,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {L4_BR, ENC, HEVC,
+ 1, MAX_BITRATE, 1, DEFAULT_BITRATE,
+ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR,
+ HFI_PROP_BITRATE_LAYER5,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {L5_BR, ENC, H264,
+ 1, MAX_BITRATE, 1, DEFAULT_BITRATE,
+ V4L2_CID_MPEG_VIDEO_H264_HIER_CODING_L5_BR,
+ HFI_PROP_BITRATE_LAYER6,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {L5_BR, ENC, HEVC,
+ 1, MAX_BITRATE, 1, DEFAULT_BITRATE,
+ V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR,
+ HFI_PROP_BITRATE_LAYER6,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_INPUT_PORT |
+ CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {ENTROPY_MODE, ENC, H264,
+ V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC,
+ V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC,
+ BIT(V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC) |
+ BIT(V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC),
+ V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC,
+ V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE,
+ HFI_PROP_CABAC_SESSION,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU},
+
+ {ENTROPY_MODE, DEC, H264 | HEVC | VP9,
+ V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC,
+ V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC,
+ BIT(V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC) |
+ BIT(V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC),
+ V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC,
+ 0,
+ HFI_PROP_CABAC_SESSION},
+
+ {PROFILE, ENC | DEC, H264,
+ V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE,
+ V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH,
+ BIT(V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE) |
+ BIT(V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH) |
+ BIT(V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE) |
+ BIT(V4L2_MPEG_VIDEO_H264_PROFILE_MAIN) |
+ BIT(V4L2_MPEG_VIDEO_H264_PROFILE_HIGH),
+ V4L2_MPEG_VIDEO_H264_PROFILE_HIGH,
+ V4L2_CID_MPEG_VIDEO_H264_PROFILE,
+ HFI_PROP_PROFILE,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU},
+
+ {PROFILE, ENC | DEC, HEVC,
+ V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN,
+ V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10,
+ BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN) |
+ BIT(V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL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VEL_5_1) |
+ BIT(V4L2_MPEG_VIDEO_VP9_LEVEL_5_2) |
+ BIT(V4L2_MPEG_VIDEO_VP9_LEVEL_6_0),
+ V4L2_MPEG_VIDEO_VP9_LEVEL_6_0,
+ V4L2_CID_MPEG_VIDEO_VP9_LEVEL,
+ HFI_PROP_LEVEL,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU},
+
+ {HEVC_TIER, ENC | DEC, HEVC,
+ V4L2_MPEG_VIDEO_HEVC_TIER_MAIN,
+ V4L2_MPEG_VIDEO_HEVC_TIER_HIGH,
+ BIT(V4L2_MPEG_VIDEO_HEVC_TIER_MAIN) |
+ BIT(V4L2_MPEG_VIDEO_HEVC_TIER_HIGH),
+ V4L2_MPEG_VIDEO_HEVC_TIER_HIGH,
+ V4L2_CID_MPEG_VIDEO_HEVC_TIER,
+ HFI_PROP_TIER,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU},
+
+ {LF_MODE, ENC, H264,
+ V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED,
+ DB_H264_DISABLE_SLICE_BOUNDARY,
+ BIT(V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED) |
+ BIT(V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED) |
+ BIT(DB_H264_DISABLE_SLICE_BOUNDARY),
+ V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED,
+ V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE,
+ HFI_PROP_DEBLOCKING_MODE,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU},
+
+ {LF_MODE, ENC, HEVC,
+ V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED,
+ DB_HEVC_DISABLE_SLICE_BOUNDARY,
+ BIT(V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED) |
+ BIT(V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED) |
+ BIT(DB_HEVC_DISABLE_SLICE_BOUNDARY),
+ V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED,
+ V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE,
+ HFI_PROP_DEBLOCKING_MODE,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU},
+
+ {LF_ALPHA, ENC, H264,
+ -6, 6, 1, 0,
+ V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA},
+
+ {LF_ALPHA, ENC, HEVC,
+ -6, 6, 1, 0,
+ V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2},
+
+ {LF_BETA, ENC, H264,
+ -6, 6, 1, 0,
+ V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA},
+
+ {LF_BETA, ENC, HEVC,
+ -6, 6, 1, 0,
+ V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2},
+
+ {SLICE_MODE, ENC, H264 | HEVC,
+ V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE,
+ V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES,
+ BIT(V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE) |
+ BIT(V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB) |
+ BIT(V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES),
+ V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE,
+ V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE,
+ 0,
+ CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU},
+
+ {SLICE_MAX_BYTES, ENC, H264 | HEVC,
+ MIN_SLICE_BYTE_SIZE, MAX_SLICE_BYTE_SIZE,
+ 1, MIN_SLICE_BYTE_SIZE,
+ V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES,
+ HFI_PROP_MULTI_SLICE_BYTES_COUNT,
+ CAP_FLAG_OUTPUT_PORT},
+
+ {SLICE_MAX_MB, ENC, H264 | HEVC,
+ 1, MAX_SLICE_MB_SIZE, 1, 1,
+ V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB,
+ HFI_PROP_MULTI_SLICE_MB_COUNT,
+ CAP_FLAG_OUTPUT_PORT},
+
+ {MB_RC, ENC, H264 | HEVC,
+ 0, 1, 1, 1,
+ V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE,
+ 0,
+ CAP_FLAG_OUTPUT_PORT},
+
+ {TRANSFORM_8X8, ENC, H264,
+ 0, 1, 1, 1,
+ V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM,
+ HFI_PROP_8X8_TRANSFORM,
+ CAP_FLAG_OUTPUT_PORT},
+
+ {CHROMA_QP_INDEX_OFFSET, ENC, HEVC,
+ MIN_CHROMA_QP_OFFSET, MAX_CHROMA_QP_OFFSET,
+ 1, MAX_CHROMA_QP_OFFSET,
+ V4L2_CID_MPEG_VIDEO_H264_CHROMA_QP_INDEX_OFFSET,
+ HFI_PROP_CHROMA_QP_OFFSET,
+ CAP_FLAG_OUTPUT_PORT},
+
+ {DISPLAY_DELAY_ENABLE, DEC, H264 | HEVC | VP9,
+ 0, 1, 1, 0,
+ V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE,
+ HFI_PROP_DECODE_ORDER_OUTPUT,
+ CAP_FLAG_INPUT_PORT},
+
+ {DISPLAY_DELAY, DEC, H264 | HEVC | VP9,
+ 0, 1, 1, 0,
+ V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY,
+ HFI_PROP_DECODE_ORDER_OUTPUT,
+ CAP_FLAG_INPUT_PORT},
+
+ {OUTPUT_ORDER, DEC, H264 | HEVC | VP9,
+ 0, 1, 1, 0,
+ 0,
+ HFI_PROP_DECODE_ORDER_OUTPUT,
+ CAP_FLAG_INPUT_PORT},
+
+ {INPUT_BUF_HOST_MAX_COUNT, ENC | DEC, CODECS_ALL,
+ DEFAULT_MAX_HOST_BUF_COUNT, DEFAULT_MAX_HOST_BURST_BUF_COUNT,
+ 1, DEFAULT_MAX_HOST_BUF_COUNT,
+ 0,
+ HFI_PROP_BUFFER_HOST_MAX_COUNT,
+ CAP_FLAG_INPUT_PORT},
+
+ {OUTPUT_BUF_HOST_MAX_COUNT, ENC | DEC, CODECS_ALL,
+ DEFAULT_MAX_HOST_BUF_COUNT, DEFAULT_MAX_HOST_BURST_BUF_COUNT,
+ 1, DEFAULT_MAX_HOST_BUF_COUNT,
+ 0,
+ HFI_PROP_BUFFER_HOST_MAX_COUNT,
+ CAP_FLAG_OUTPUT_PORT},
+
+ {CONCEAL_COLOR_8BIT, DEC, CODECS_ALL, 0x0, 0xff3fcff, 1,
+ DEFAULT_VIDEO_CONCEAL_COLOR_BLACK,
+ V4L2_CID_MPEG_VIDEO_MUTE_YUV,
+ HFI_PROP_CONCEAL_COLOR_8BIT,
+ CAP_FLAG_INPUT_PORT},
+
+ {CONCEAL_COLOR_10BIT, DEC, CODECS_ALL, 0x0, 0x3fffffff, 1,
+ DEFAULT_VIDEO_CONCEAL_COLOR_BLACK,
+ V4L2_CID_MPEG_VIDEO_MUTE_YUV,
+ HFI_PROP_CONCEAL_COLOR_10BIT,
+ CAP_FLAG_INPUT_PORT},
+
+ {STAGE, DEC | ENC, CODECS_ALL,
+ MSM_VIDC_STAGE_1,
+ MSM_VIDC_STAGE_2, 1,
+ MSM_VIDC_STAGE_2,
+ 0,
+ HFI_PROP_STAGE},
+
+ {PIPE, DEC | ENC, CODECS_ALL,
+ MSM_VIDC_PIPE_1,
+ MSM_VIDC_PIPE_4, 1,
+ MSM_VIDC_PIPE_4,
+ 0,
+ HFI_PROP_PIPE},
+
+ {POC, DEC, H264, 0, 2, 1, 1,
+ 0,
+ HFI_PROP_PIC_ORDER_CNT_TYPE},
+
+ {QUALITY_MODE, ENC, CODECS_ALL,
+ MSM_VIDC_MAX_QUALITY_MODE,
+ MSM_VIDC_POWER_SAVE_MODE, 1,
+ MSM_VIDC_POWER_SAVE_MODE},
+
+ {CODED_FRAMES, DEC, H264 | HEVC,
+ CODED_FRAMES_PROGRESSIVE, CODED_FRAMES_INTERLACE,
+ 1, CODED_FRAMES_PROGRESSIVE,
+ 0,
+ HFI_PROP_CODED_FRAMES},
+
+ {BIT_DEPTH, DEC, CODECS_ALL, BIT_DEPTH_8, BIT_DEPTH_10, 1, BIT_DEPTH_8,
+ 0,
+ HFI_PROP_LUMA_CHROMA_BIT_DEPTH},
+
+ {BITSTREAM_SIZE_OVERWRITE, DEC, CODECS_ALL, 0, INT_MAX, 1, 0,
+ 0},
+
+ {DEFAULT_HEADER, DEC, CODECS_ALL,
+ 0, 1, 1, 0,
+ 0,
+ HFI_PROP_DEC_DEFAULT_HEADER},
+
+ {RAP_FRAME, DEC, CODECS_ALL,
+ 0, 1, 1, 1,
+ 0,
+ HFI_PROP_DEC_START_FROM_RAP_FRAME,
+ CAP_FLAG_INPUT_PORT},
+
+ {SEQ_CHANGE_AT_SYNC_FRAME, DEC, CODECS_ALL,
+ 0, 1, 1, 1,
+ 0,
+ HFI_PROP_SEQ_CHANGE_AT_SYNC_FRAME,
+ CAP_FLAG_INPUT_PORT | CAP_FLAG_DYNAMIC_ALLOWED},
+
+ {ALL_INTRA, ENC, H264 | HEVC,
+ 0, 1, 1, 0,
+ 0,
+ 0,
+ CAP_FLAG_OUTPUT_PORT},
+};
+
+static struct msm_platform_inst_cap_dependency instance_cap_dependency_data_sm8550[] = {
+ /* {cap, domain, codec,
+ * children,
+ * adjust, set}
+ */
+
+ {PIX_FMTS, ENC, H264,
+ {IR_PERIOD}},
+
+ {PIX_FMTS, ENC, HEVC,
+ {PROFILE, MIN_FRAME_QP, MAX_FRAME_QP, I_FRAME_QP, P_FRAME_QP,
+ B_FRAME_QP, MIN_QUALITY, IR_PERIOD, LTR_COUNT}},
+
+ {PIX_FMTS, DEC, HEVC,
+ {PROFILE}},
+
+ {FRAME_RATE, ENC, CODECS_ALL,
+ {0},
+ NULL,
+ msm_vidc_set_q16},
+
+ {HFLIP, ENC, CODECS_ALL,
+ {0},
+ NULL,
+ msm_vidc_set_flip},
+
+ {VFLIP, ENC, CODECS_ALL,
+ {0},
+ NULL,
+ msm_vidc_set_flip},
+
+ {ROTATION, ENC, CODECS_ALL,
+ {0},
+ NULL,
+ msm_vidc_set_rotation},
+
+ {HEADER_MODE, ENC, CODECS_ALL,
+ {0},
+ NULL,
+ msm_vidc_set_header_mode},
+
+ {WITHOUT_STARTCODE, ENC, CODECS_ALL,
+ {0},
+ NULL,
+ msm_vidc_set_nal_length},
+
+ {REQUEST_I_FRAME, ENC, H264 | HEVC,
+ {0},
+ NULL,
+ msm_vidc_set_req_sync_frame},
+
+ {BIT_RATE, ENC, H264,
+ {PEAK_BITRATE, L0_BR},
+ msm_vidc_adjust_bitrate,
+ msm_vidc_set_bitrate},
+
+ {BIT_RATE, ENC, HEVC,
+ {PEAK_BITRATE, L0_BR},
+ msm_vidc_adjust_bitrate,
+ msm_vidc_set_bitrate},
+
+ {BITRATE_MODE, ENC, H264,
+ {LTR_COUNT, IR_PERIOD, I_FRAME_QP, P_FRAME_QP,
+ B_FRAME_QP, ENH_LAYER_COUNT, BIT_RATE,
+ MIN_QUALITY, VBV_DELAY,
+ PEAK_BITRATE, SLICE_MODE},
+ msm_vidc_adjust_bitrate_mode,
+ msm_vidc_set_u32_enum},
+
+ {BITRATE_MODE, ENC, HEVC,
+ {LTR_COUNT, IR_PERIOD, I_FRAME_QP, P_FRAME_QP,
+ B_FRAME_QP, CONSTANT_QUALITY, ENH_LAYER_COUNT,
+ BIT_RATE, MIN_QUALITY, VBV_DELAY,
+ PEAK_BITRATE, SLICE_MODE},
+ msm_vidc_adjust_bitrate_mode,
+ msm_vidc_set_u32_enum},
+
+ {CONSTANT_QUALITY, ENC, HEVC,
+ {0},
+ NULL,
+ msm_vidc_set_constant_quality},
+
+ {GOP_SIZE, ENC, CODECS_ALL,
+ {ALL_INTRA},
+ msm_vidc_adjust_gop_size,
+ msm_vidc_set_gop_size},
+
+ {B_FRAME, ENC, H264 | HEVC,
+ {ALL_INTRA},
+ msm_vidc_adjust_b_frame,
+ msm_vidc_set_u32},
+
+ {LTR_COUNT, ENC, H264 | HEVC,
+ {0},
+ msm_vidc_adjust_ltr_count,
+ msm_vidc_set_u32},
+
+ {USE_LTR, ENC, H264 | HEVC,
+ {0},
+ msm_vidc_adjust_use_ltr,
+ msm_vidc_set_use_and_mark_ltr},
+
+ {MARK_LTR, ENC, H264 | HEVC,
+ {0},
+ msm_vidc_adjust_mark_ltr,
+ msm_vidc_set_use_and_mark_ltr},
+
+ {IR_PERIOD, ENC, H264 | HEVC,
+ {0},
+ msm_vidc_adjust_ir_period,
+ msm_vidc_set_ir_period},
+
+ {AU_DELIMITER, ENC, H264 | HEVC,
+ {0},
+ NULL,
+ msm_vidc_set_u32},
+
+ {MIN_QUALITY, ENC, H264,
+ {0},
+ msm_vidc_adjust_min_quality,
+ msm_vidc_set_u32},
+
+ {MIN_QUALITY, ENC, HEVC,
+ {0},
+ msm_vidc_adjust_min_quality,
+ msm_vidc_set_u32},
+
+ {VBV_DELAY, ENC, H264 | HEVC,
+ {0},
+ NULL,
+ msm_vidc_set_cbr_related_properties},
+
+ {PEAK_BITRATE, ENC, H264 | HEVC,
+ {0},
+ msm_vidc_adjust_peak_bitrate,
+ msm_vidc_set_cbr_related_properties},
+
+ {MIN_FRAME_QP, ENC, H264,
+ {0},
+ NULL,
+ msm_vidc_set_min_qp},
+
+ {MIN_FRAME_QP, ENC, HEVC,
+ {0},
+ msm_vidc_adjust_hevc_min_qp,
+ msm_vidc_set_min_qp},
+
+ {MAX_FRAME_QP, ENC, H264,
+ {0},
+ NULL,
+ msm_vidc_set_max_qp},
+
+ {MAX_FRAME_QP, ENC, HEVC,
+ {0},
+ msm_vidc_adjust_hevc_max_qp,
+ msm_vidc_set_max_qp},
+
+ {I_FRAME_QP, ENC, HEVC,
+ {0},
+ msm_vidc_adjust_hevc_i_frame_qp,
+ msm_vidc_set_frame_qp},
+
+ {I_FRAME_QP, ENC, H264,
+ {0},
+ NULL,
+ msm_vidc_set_frame_qp},
+
+ {P_FRAME_QP, ENC, HEVC,
+ {0},
+ msm_vidc_adjust_hevc_p_frame_qp,
+ msm_vidc_set_frame_qp},
+
+ {P_FRAME_QP, ENC, H264,
+ {0},
+ NULL,
+ msm_vidc_set_frame_qp},
+
+ {B_FRAME_QP, ENC, HEVC,
+ {0},
+ msm_vidc_adjust_hevc_b_frame_qp,
+ msm_vidc_set_frame_qp},
+
+ {B_FRAME_QP, ENC, H264,
+ {0},
+ NULL,
+ msm_vidc_set_frame_qp},
+
+ {LAYER_TYPE, ENC, H264 | HEVC,
+ {LTR_COUNT}},
+
+ {LAYER_ENABLE, ENC, H264 | HEVC,
+ {0}},
+
+ {ENH_LAYER_COUNT, ENC, H264 | HEVC,
+ {GOP_SIZE, B_FRAME, BIT_RATE, MIN_QUALITY, SLICE_MODE,
+ LTR_COUNT},
+ msm_vidc_adjust_layer_count,
+ msm_vidc_set_layer_count_and_type},
+
+ {L0_BR, ENC, H264 | HEVC,
+ {L1_BR},
+ msm_vidc_adjust_layer_bitrate,
+ msm_vidc_set_layer_bitrate},
+
+ {L1_BR, ENC, H264 | HEVC,
+ {L2_BR},
+ msm_vidc_adjust_layer_bitrate,
+ msm_vidc_set_layer_bitrate},
+
+ {L2_BR, ENC, H264 | HEVC,
+ {L3_BR},
+ msm_vidc_adjust_layer_bitrate,
+ msm_vidc_set_layer_bitrate},
+
+ {L3_BR, ENC, H264 | HEVC,
+ {L4_BR},
+ msm_vidc_adjust_layer_bitrate,
+ msm_vidc_set_layer_bitrate},
+
+ {L4_BR, ENC, H264 | HEVC,
+ {L5_BR},
+ msm_vidc_adjust_layer_bitrate,
+ msm_vidc_set_layer_bitrate},
+
+ {L5_BR, ENC, H264 | HEVC,
+ {0},
+ msm_vidc_adjust_layer_bitrate,
+ msm_vidc_set_layer_bitrate},
+
+ {ENTROPY_MODE, ENC, H264,
+ {BIT_RATE},
+ msm_vidc_adjust_entropy_mode,
+ msm_vidc_set_u32},
+
+ {PROFILE, ENC, H264,
+ {ENTROPY_MODE, TRANSFORM_8X8},
+ NULL,
+ msm_vidc_set_u32_enum},
+
+ {PROFILE, DEC, H264,
+ {ENTROPY_MODE},
+ NULL,
+ msm_vidc_set_u32_enum},
+
+ {PROFILE, ENC | DEC, HEVC,
+ {0},
+ msm_vidc_adjust_profile,
+ msm_vidc_set_u32_enum},
+
+ {PROFILE, DEC, VP9,
+ {0},
+ NULL,
+ msm_vidc_set_u32_enum},
+
+ {LEVEL, DEC, CODECS_ALL,
+ {0},
+ NULL,
+ msm_vidc_set_u32_enum},
+
+ {LEVEL, ENC, CODECS_ALL,
+ {0},
+ NULL,
+ msm_vidc_set_level},
+
+ {HEVC_TIER, ENC | DEC, HEVC,
+ {0},
+ NULL,
+ msm_vidc_set_u32_enum},
+
+ {LF_MODE, ENC, CODECS_ALL,
+ {0},
+ NULL,
+ msm_vidc_set_deblock_mode},
+
+ {SLICE_MODE, ENC, H264 | HEVC,
+ {STAGE},
+ msm_vidc_adjust_slice_count,
+ msm_vidc_set_slice_count},
+
+ {TRANSFORM_8X8, ENC, H264,
+ {0},
+ msm_vidc_adjust_transform_8x8,
+ msm_vidc_set_u32},
+
+ {CHROMA_QP_INDEX_OFFSET, ENC, HEVC,
+ {0},
+ msm_vidc_adjust_chroma_qp_index_offset,
+ msm_vidc_set_chroma_qp_index_offset},
+
+ {DISPLAY_DELAY_ENABLE, DEC, H264 | HEVC | VP9,
+ {OUTPUT_ORDER},
+ NULL,
+ NULL},
+
+ {DISPLAY_DELAY, DEC, H264 | HEVC | VP9,
+ {OUTPUT_ORDER},
+ NULL,
+ NULL},
+
+ {OUTPUT_ORDER, DEC, H264 | HEVC | VP9,
+ {0},
+ msm_vidc_adjust_output_order,
+ msm_vidc_set_u32},
+
+ {INPUT_BUF_HOST_MAX_COUNT, ENC | DEC, CODECS_ALL,
+ {0},
+ msm_vidc_adjust_input_buf_host_max_count,
+ msm_vidc_set_u32},
+
+ {INPUT_BUF_HOST_MAX_COUNT, ENC, H264 | HEVC,
+ {0},
+ msm_vidc_adjust_input_buf_host_max_count,
+ msm_vidc_set_u32},
+
+ {OUTPUT_BUF_HOST_MAX_COUNT, ENC | DEC, CODECS_ALL,
+ {0},
+ msm_vidc_adjust_output_buf_host_max_count,
+ msm_vidc_set_u32},
+
+ {OUTPUT_BUF_HOST_MAX_COUNT, ENC, H264 | HEVC,
+ {0},
+ msm_vidc_adjust_output_buf_host_max_count,
+ msm_vidc_set_u32},
+
+ {CONCEAL_COLOR_8BIT, DEC, CODECS_ALL,
+ {0},
+ NULL,
+ msm_vidc_set_u32_packed},
+
+ {CONCEAL_COLOR_10BIT, DEC, CODECS_ALL,
+ {0},
+ NULL,
+ msm_vidc_set_u32_packed},
+
+ {STAGE, ENC | DEC, CODECS_ALL,
+ {0},
+ NULL,
+ msm_vidc_set_stage},
+
+ {STAGE, ENC, H264 | HEVC,
+ {0},
+ NULL,
+ msm_vidc_set_stage},
+
+ {STAGE, DEC, H264 | HEVC | VP9,
+ {0},
+ NULL,
+ msm_vidc_set_stage},
+
+ {PIPE, DEC | ENC, CODECS_ALL,
+ {0},
+ NULL,
+ msm_vidc_set_pipe},
+
+ {RAP_FRAME, DEC, CODECS_ALL,
+ {0},
+ NULL,
+ msm_vidc_set_u32},
+
+ {ALL_INTRA, ENC, H264 | HEVC,
+ {LTR_COUNT, IR_PERIOD, SLICE_MODE, BIT_RATE},
+ msm_vidc_adjust_all_intra,
+ NULL},
+};
+
+/* Default UBWC config for LPDDR5 */
+static struct msm_vidc_ubwc_config_data ubwc_config_sm8550[] = {
+ UBWC_CONFIG(8, 32, 16, 0, 1, 1, 1),
+};
+
+static struct msm_vidc_format_capability format_data_sm8550 = {
+ .codec_info = codec_data_sm8550,
+ .codec_info_size = ARRAY_SIZE(codec_data_sm8550),
+ .color_format_info = color_format_data_sm8550,
+ .color_format_info_size = ARRAY_SIZE(color_format_data_sm8550),
+ .color_prim_info = color_primaries_data_sm8550,
+ .color_prim_info_size = ARRAY_SIZE(color_primaries_data_sm8550),
+ .transfer_char_info = transfer_char_data_sm8550,
+ .transfer_char_info_size = ARRAY_SIZE(transfer_char_data_sm8550),
+ .matrix_coeff_info = matrix_coeff_data_sm8550,
+ .matrix_coeff_info_size = ARRAY_SIZE(matrix_coeff_data_sm8550),
+};
+
+/* name, min_kbps, max_kbps */
+static const struct bw_table sm8550_bw_table[] = {
+ { "venus-cnoc", 1000, 1000 },
+ { "venus-ddr", 1000, 15000000 },