From 56010535ad69b357fbe1ba2482ac16af4a807373 Mon Sep 17 00:00:00 2001 From: Dikshita Agarwal Date: Wed, 12 Jun 2019 16:29:57 +0530 Subject: [PATCH] msm: vidc: add caps for batch mode decode - Add caps for batch mode decode for lito. - fix min value for few caps. Change-Id: I24ae2baf506f885398ef9f121e6a25a141078db8 --- msm/vidc/msm_vidc_platform.c | 54 +++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/msm/vidc/msm_vidc_platform.c b/msm/vidc/msm_vidc_platform.c index 0ab19939dfb9..ff57dd450778 100644 --- a/msm/vidc/msm_vidc_platform.c +++ b/msm/vidc/msm_vidc_platform.c @@ -162,9 +162,9 @@ static struct msm_vidc_codec_capability lito_capabilities_v0[] = { {CAP_FRAME_WIDTH, DOMAINS_ALL, CODECS_ALL, 96, 5760, 1, 1920}, {CAP_FRAME_HEIGHT, DOMAINS_ALL, CODECS_ALL, 96, 5760, 1, 1080}, /* ((5760 * 2880) / 256) */ - {CAP_MBS_PER_FRAME, DOMAINS_ALL, CODECS_ALL, 1, 64800, 1, 34560}, + {CAP_MBS_PER_FRAME, DOMAINS_ALL, CODECS_ALL, 36, 64800, 1, 34560}, /* ((4096x2160)/256)@90fps */ - {CAP_MBS_PER_SECOND, DOMAINS_ALL, CODECS_ALL, 1, 3110400, 1, 2073600}, + {CAP_MBS_PER_SECOND, DOMAINS_ALL, CODECS_ALL, 36, 3110400, 1, 2073600}, {CAP_FRAMERATE, DOMAINS_ALL, CODECS_ALL, 1, 480, 1, 30}, {CAP_BITRATE, DOMAINS_ALL, CODECS_ALL, 1, 200000000, 1, 20000000}, {CAP_SCALE_X, DOMAINS_ALL, CODECS_ALL, 4096, 65536, 1, 4096}, @@ -190,9 +190,9 @@ static struct msm_vidc_codec_capability lito_capabilities_v0[] = { {CAP_FRAME_WIDTH, ENC|DEC, VP8, 96, 1920, 1, 1920}, {CAP_FRAME_HEIGHT, ENC|DEC, VP8, 96, 1920, 1, 1080}, /* (1920 * 1088) / 256 */ - {CAP_MBS_PER_FRAME, ENC|DEC, VP8, 1, 8160, 1, 8160}, + {CAP_MBS_PER_FRAME, ENC|DEC, VP8, 36, 8160, 1, 8160}, /* ((1920 * 1088) / 256) * 120*/ - {CAP_MBS_PER_SECOND, ENC|DEC, VP8, 1, 979200, 1, 244800}, + {CAP_MBS_PER_SECOND, ENC|DEC, VP8, 36, 979200, 1, 244800}, {CAP_FRAMERATE, ENC|DEC, VP8, 1, 120, 1, 30}, {CAP_BITRATE, ENC, VP8, 1, 40000000, 1, 20000000}, {CAP_BITRATE, DEC, VP8, 1, 100000000, 1, 20000000}, @@ -201,9 +201,9 @@ static struct msm_vidc_codec_capability lito_capabilities_v0[] = { {CAP_FRAME_WIDTH, DEC, MPEG2, 96, 1920, 1, 1920}, {CAP_FRAME_HEIGHT, DEC, MPEG2, 96, 1920, 1, 1080}, /* (1920 * 1088) / 256 */ - {CAP_MBS_PER_FRAME, DEC, MPEG2, 1, 8160, 1, 8160}, + {CAP_MBS_PER_FRAME, DEC, MPEG2, 36, 8160, 1, 8160}, /* ((1920 * 1088) / 256) * 30*/ - {CAP_MBS_PER_SECOND, DEC, MPEG2, 1, 244800, 1, 244800}, + {CAP_MBS_PER_SECOND, DEC, MPEG2, 36, 244800, 1, 244800}, {CAP_FRAMERATE, DEC, MPEG2, 1, 30, 1, 30}, {CAP_BITRATE, DEC, MPEG2, 1, 40000000, 1, 20000000}, @@ -211,8 +211,13 @@ static struct msm_vidc_codec_capability lito_capabilities_v0[] = { {CAP_SECURE_FRAME_WIDTH, DOMAINS_ALL, CODECS_ALL, 96, 4096, 1, 1920}, {CAP_SECURE_FRAME_HEIGHT, DOMAINS_ALL, CODECS_ALL, 96, 4096, 1, 1080}, /* (4096 * 2160) / 256 */ - {CAP_SECURE_MBS_PER_FRAME, DOMAINS_ALL, CODECS_ALL, 1, 34560, 1, 34560}, + {CAP_SECURE_MBS_PER_FRAME, DOMAINS_ALL, CODECS_ALL, 36, 34560, 1, 34560}, {CAP_SECURE_BITRATE, DOMAINS_ALL, CODECS_ALL, 1, 40000000, 1, 20000000}, + + /* Batch Mode Decode */ + {CAP_BATCH_MAX_MB_PER_FRAME, DEC, CODECS_ALL, 36, 8160, 1, 8160}, + /* (1920 * 1080) / 256 */ + {CAP_BATCH_MAX_FPS, DEC, CODECS_ALL, 1, 30, 1, 30}, }; static struct msm_vidc_codec_capability lito_capabilities_v1[] = { @@ -220,9 +225,9 @@ static struct msm_vidc_codec_capability lito_capabilities_v1[] = { {CAP_FRAME_WIDTH, DOMAINS_ALL, CODECS_ALL, 96, 4096, 1, 1920}, {CAP_FRAME_HEIGHT, DOMAINS_ALL, CODECS_ALL, 96, 4096, 1, 1080}, /* ((4096 * 2160) / 256) */ - {CAP_MBS_PER_FRAME, DOMAINS_ALL, CODECS_ALL, 1, 34560, 1, 34560}, + {CAP_MBS_PER_FRAME, DOMAINS_ALL, CODECS_ALL, 36, 34560, 1, 34560}, /* 4K@30 decode + 1080@30 encode */ - {CAP_MBS_PER_SECOND, DOMAINS_ALL, CODECS_ALL, 1, 1281600, 1, 2073600}, + {CAP_MBS_PER_SECOND, DOMAINS_ALL, CODECS_ALL, 36, 1281600, 1, 2073600}, {CAP_FRAMERATE, DOMAINS_ALL, CODECS_ALL, 1, 240, 1, 30}, {CAP_BITRATE, DOMAINS_ALL, CODECS_ALL, 1, 100000000, 1, 20000000}, {CAP_SCALE_X, DOMAINS_ALL, CODECS_ALL, 4096, 65536, 1, 4096}, @@ -248,9 +253,9 @@ static struct msm_vidc_codec_capability lito_capabilities_v1[] = { {CAP_FRAME_WIDTH, ENC|DEC, VP8, 96, 1920, 1, 1920}, {CAP_FRAME_HEIGHT, ENC|DEC, VP8, 96, 1920, 1, 1080}, /* (1920 * 1088) / 256 */ - {CAP_MBS_PER_FRAME, ENC|DEC, VP8, 1, 8160, 1, 8160}, + {CAP_MBS_PER_FRAME, ENC|DEC, VP8, 36, 8160, 1, 8160}, /* ((1920 * 1088) / 256) * 120*/ - {CAP_MBS_PER_SECOND, ENC|DEC, VP8, 1, 979200, 1, 244800}, + {CAP_MBS_PER_SECOND, ENC|DEC, VP8, 36, 979200, 1, 244800}, {CAP_FRAMERATE, ENC|DEC, VP8, 1, 120, 1, 30}, {CAP_BITRATE, ENC, VP8, 1, 40000000, 1, 20000000}, {CAP_BITRATE, DEC, VP8, 1, 100000000, 1, 20000000}, @@ -259,9 +264,9 @@ static struct msm_vidc_codec_capability lito_capabilities_v1[] = { {CAP_FRAME_WIDTH, DEC, MPEG2, 96, 1920, 1, 1920}, {CAP_FRAME_HEIGHT, DEC, MPEG2, 96, 1920, 1, 1080}, /* (1920 * 1088) / 256 */ - {CAP_MBS_PER_FRAME, DEC, MPEG2, 1, 8160, 1, 8160}, + {CAP_MBS_PER_FRAME, DEC, MPEG2, 36, 8160, 1, 8160}, /* ((1920 * 1088) / 256) * 30*/ - {CAP_MBS_PER_SECOND, DEC, MPEG2, 1, 244800, 1, 244800}, + {CAP_MBS_PER_SECOND, DEC, MPEG2, 36, 244800, 1, 244800}, {CAP_FRAMERATE, DEC, MPEG2, 1, 30, 1, 30}, {CAP_BITRATE, DEC, MPEG2, 1, 40000000, 1, 20000000}, @@ -269,8 +274,13 @@ static struct msm_vidc_codec_capability lito_capabilities_v1[] = { {CAP_SECURE_FRAME_WIDTH, DOMAINS_ALL, CODECS_ALL, 96, 4096, 1, 1920}, {CAP_SECURE_FRAME_HEIGHT, DOMAINS_ALL, CODECS_ALL, 96, 4096, 1, 1080}, /* (4096 * 2160) / 256 */ - {CAP_SECURE_MBS_PER_FRAME, DOMAINS_ALL, CODECS_ALL, 1, 34560, 1, 34560}, + {CAP_SECURE_MBS_PER_FRAME, DOMAINS_ALL, CODECS_ALL, 36, 34560, 1, 34560}, {CAP_SECURE_BITRATE, DOMAINS_ALL, CODECS_ALL, 1, 40000000, 1, 20000000}, + + /* Batch Mode Decode */ + {CAP_BATCH_MAX_MB_PER_FRAME, DEC, CODECS_ALL, 36, 8160, 1, 8160}, + /* (1920 * 1080) / 256 */ + {CAP_BATCH_MAX_FPS, DEC, CODECS_ALL, 1, 30, 1, 30}, }; static struct msm_vidc_codec_capability kona_capabilities[] = { @@ -278,9 +288,9 @@ static struct msm_vidc_codec_capability kona_capabilities[] = { {CAP_FRAME_WIDTH, DOMAINS_ALL, CODECS_ALL, 128, 8192, 1, 1920}, {CAP_FRAME_HEIGHT, DOMAINS_ALL, CODECS_ALL, 128, 8192, 1, 1080}, /* (8192 * 4320) / 256 */ - {CAP_MBS_PER_FRAME, DOMAINS_ALL, CODECS_ALL, 1, 138240, 1, 138240}, + {CAP_MBS_PER_FRAME, DOMAINS_ALL, CODECS_ALL, 64, 138240, 1, 138240}, /* ((1920 * 1088) / 256) * 960 fps */ - {CAP_MBS_PER_SECOND, DOMAINS_ALL, CODECS_ALL, 1, 7833600, 1, 7833600}, + {CAP_MBS_PER_SECOND, DOMAINS_ALL, CODECS_ALL, 64, 7833600, 1, 7833600}, {CAP_FRAMERATE, DOMAINS_ALL, CODECS_ALL, 1, 960, 1, 30}, {CAP_BITRATE, DOMAINS_ALL, CODECS_ALL, 1, 220000000, 1, 20000000}, {CAP_SCALE_X, DOMAINS_ALL, CODECS_ALL, 4096, 65536, 1, 4096}, @@ -306,9 +316,9 @@ static struct msm_vidc_codec_capability kona_capabilities[] = { {CAP_FRAME_WIDTH, ENC|DEC, VP8, 128, 4096, 1, 1920}, {CAP_FRAME_HEIGHT, ENC|DEC, VP8, 128, 4096, 1, 1080}, /* (4096 * 2304) / 256 */ - {CAP_MBS_PER_FRAME, ENC|DEC, VP8, 1, 36864, 1, 8160}, + {CAP_MBS_PER_FRAME, ENC|DEC, VP8, 64, 36864, 1, 8160}, /* ((4096 * 2304) / 256) * 120 */ - {CAP_MBS_PER_SECOND, ENC|DEC, VP8, 1, 4423680, 1, 244800}, + {CAP_MBS_PER_SECOND, ENC|DEC, VP8, 64, 4423680, 1, 244800}, {CAP_FRAMERATE, ENC|DEC, VP8, 1, 120, 1, 30}, {CAP_BITRATE, ENC, VP8, 1, 74000000, 1, 20000000}, {CAP_BITRATE, DEC, VP8, 1, 220000000, 1, 20000000}, @@ -317,9 +327,9 @@ static struct msm_vidc_codec_capability kona_capabilities[] = { {CAP_FRAME_WIDTH, DEC, MPEG2, 128, 1920, 1, 1920}, {CAP_FRAME_HEIGHT, DEC, MPEG2, 128, 1920, 1, 1080}, /* (1920 * 1088) / 256 */ - {CAP_MBS_PER_FRAME, DEC, MPEG2, 1, 8160, 1, 8160}, + {CAP_MBS_PER_FRAME, DEC, MPEG2, 64, 8160, 1, 8160}, /* ((1920 * 1088) / 256) * 30*/ - {CAP_MBS_PER_SECOND, DEC, MPEG2, 1, 244800, 1, 244800}, + {CAP_MBS_PER_SECOND, DEC, MPEG2, 64, 244800, 1, 244800}, {CAP_FRAMERATE, DEC, MPEG2, 1, 30, 1, 30}, {CAP_BITRATE, DEC, MPEG2, 1, 40000000, 1, 20000000}, @@ -327,11 +337,11 @@ static struct msm_vidc_codec_capability kona_capabilities[] = { {CAP_SECURE_FRAME_WIDTH, DOMAINS_ALL, CODECS_ALL, 128, 4096, 1, 1920}, {CAP_SECURE_FRAME_HEIGHT, DOMAINS_ALL, CODECS_ALL, 128, 4096, 1, 1080}, /* (4096 * 2304) / 256 */ - {CAP_SECURE_MBS_PER_FRAME, DOMAINS_ALL, CODECS_ALL, 1, 36864, 1, 36864}, + {CAP_SECURE_MBS_PER_FRAME, DOMAINS_ALL, CODECS_ALL, 64, 36864, 1, 36864}, {CAP_SECURE_BITRATE, DOMAINS_ALL, CODECS_ALL, 1, 40000000, 1, 20000000}, /* Batch Mode Decode */ - {CAP_BATCH_MAX_MB_PER_FRAME, DEC, CODECS_ALL, 128, 34560, 1, 34560}, + {CAP_BATCH_MAX_MB_PER_FRAME, DEC, CODECS_ALL, 64, 34560, 1, 34560}, /* (4096 * 2160) / 256 */ {CAP_BATCH_MAX_FPS, DEC, CODECS_ALL, 1, 120, 1, 120}, };