Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp577326pxu; Thu, 15 Oct 2020 10:59:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxuPHJTAsuMz05Mw2HWBT2lqK8rYg6DJu9v8ljFHuF8xkJxiU7+a5pAfav41f5xnzvWT3R X-Received: by 2002:a17:906:5618:: with SMTP id f24mr5633323ejq.86.1602784750595; Thu, 15 Oct 2020 10:59:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602784750; cv=none; d=google.com; s=arc-20160816; b=yYdekLyLQ88f58rsdb9AfbHUf/ZFbWJyvdqPYEE3++YbjsTv7XbxpCSkQnNAkKGugz Lc+fTzbbuX1Njfma5P4K80245vY6qg43HPGdR4/qgp5VQBqtawDAvgt0GNjB8IeS8HFY cL6PX6Y10G7dWiAMBeuy3oz47MX0Ys5vvhYbQE91i4oted477MdyRMfj/UOU1/RPy1fw oBPqhMh0IJWP7KlLZTUFeDvRkWBy5+9Lac42zaeK9hbbnXzRcELFhLeCt6qWLk4DHu7u NMF09feqgw1oG2guoYEnL2tb2CG4ZbwC9hp2XA3XBLPXynctfByJhvpajrREf8MOfdAf fE1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=h3rs6enF8H0JTkBi2Efs6ZKcBUz3qw4VQ6am58jI4Uc=; b=aWtSI9OI4WR3LjF6WitLaJHDmzokQl3ZPcKkDBzHhhVYPKKaPhPMnMweTlnwbvKeGi DPLJssXK+QKVNONZ/ua+dJz8EJIYCf+39lQJ5gS1y+hrLZNxvqfVjKMp5uH7xc1C3W7C ykQm0u1EZ4J1bwO0MhM9WScuPECPmxvU5kPyNHqngK3spI9tR0HLh1Z75W48udMWQi4z RvpwgF8B7NM5689QG6J9usEIt0QJS35xfwV7wEGgxX3Th0ZR/oKeLwzEX+3KLcpF3a5Q A2AIKzzCsxaGrJIzNs6Bi74hAHiFt5s3AQJ+NPysB2Vm7nWojRp9Gguf+31ep+uQsR1R M54g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gj3si2750032ejb.313.2020.10.15.10.58.41; Thu, 15 Oct 2020 10:59:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728137AbgJOLFv (ORCPT + 99 others); Thu, 15 Oct 2020 07:05:51 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:55499 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726144AbgJOLFv (ORCPT ); Thu, 15 Oct 2020 07:05:51 -0400 Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 15 Oct 2020 04:05:50 -0700 X-QCInternal: smtphost Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/AES256-SHA; 15 Oct 2020 04:05:49 -0700 X-QCInternal: smtphost Received: from dikshita-linux.qualcomm.com ([10.204.65.237]) by ironmsg01-blr.qualcomm.com with ESMTP; 15 Oct 2020 16:35:46 +0530 Received: by dikshita-linux.qualcomm.com (Postfix, from userid 347544) id 7A8B6522C; Thu, 15 Oct 2020 16:35:45 +0530 (IST) From: Dikshita Agarwal To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: mchehab@kernel.org, hverkuil-cisco@xs4all.nl, ezequiel@collabora.com, stanimir.varbanov@linaro.org, vgarodia@codeaurora.org, majja@codeaurora.org, Dikshita Agarwal Subject: [PATCH v2] media: v4l2-ctrl: Add base layer priority id control. Date: Thu, 15 Oct 2020 16:35:35 +0530 Message-Id: <1602759935-12965-1-git-send-email-dikshita@codeaurora.org> X-Mailer: git-send-email 1.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This control indicates the priority id to be applied to base layer. Signed-off-by: Dikshita Agarwal --- Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst | 9 +++++++++ drivers/media/v4l2-core/v4l2-ctrls.c | 1 + include/uapi/linux/v4l2-controls.h | 1 + 3 files changed, 11 insertions(+) diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst index 6e9240a..aac1ea3 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst @@ -4407,3 +4407,12 @@ enum v4l2_mpeg_video_hevc_size_of_length_field - to the LTR index max LTR count-1. This is applicable to H264 and HEVC encoder and can be applied using request api. + +``V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITYID (integer)`` + Specifies a priority identifier for the NAL unit, + which will be applied to base layer. + By default this value is set to 0 for base layer. + And the next layer will have priority ID assigned as 1,2,3 and so on. + Video encode can't decide the priority id to be applied to a layer + so this has to come from client. + Valid Range: from 0 to 63 diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index 046198f..c973058 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -952,6 +952,7 @@ const char *v4l2_ctrl_get_name(u32 id) case V4L2_CID_MPEG_VIDEO_LTR_COUNT: return "LTR Count"; case V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX: return "Mark LTR frame index"; case V4L2_CID_MPEG_VIDEO_USE_LTR_FRAME: return "Use LTR Frame"; + case V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITYID: return "Base Layer Priority ID"; case V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS: return "MPEG-2 Slice Parameters"; case V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION: return "MPEG-2 Quantization Matrices"; case V4L2_CID_MPEG_VIDEO_FWHT_PARAMS: return "FWHT Stateless Parameters"; diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 3801372..433e119 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -418,6 +418,7 @@ enum v4l2_mpeg_video_multi_slice_mode { #define V4L2_CID_MPEG_VIDEO_LTR_COUNT (V4L2_CID_MPEG_BASE+230) #define V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX (V4L2_CID_MPEG_BASE+231) #define V4L2_CID_MPEG_VIDEO_USE_LTR_FRAME (V4L2_CID_MPEG_BASE+232) +#define V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITYID (V4L2_CID_MPEG_BASE+233) /* CIDs for the MPEG-2 Part 2 (H.262) codec */ #define V4L2_CID_MPEG_VIDEO_MPEG2_LEVEL (V4L2_CID_MPEG_BASE+270) -- 1.9.1