From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org, linux-api@vger.kernel.org
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Stanimir Varbanov <stanimir.varbanov@linaro.org>
Subject: [PATCH 3/3] venus: Add a handling of QC10C compressed format
Date: Thu, 29 Apr 2021 13:58:15 +0300 [thread overview]
Message-ID: <20210429105815.2790770-4-stanimir.varbanov@linaro.org> (raw)
In-Reply-To: <20210429105815.2790770-1-stanimir.varbanov@linaro.org>
This adds QC10C compressed pixel format in the Venus driver, and
make it enumeratable from v4l2 clients.
Note: The QC10C format shouldn't be possible to enumerate by the
client if the decoded bitstream is not 10bits. This is not
implemented in this patch yet.
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
---
drivers/media/platform/qcom/venus/helpers.c | 2 ++
drivers/media/platform/qcom/venus/vdec.c | 6 +++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
index 3a0b07d237a5..58bf2e0654ce 100644
--- a/drivers/media/platform/qcom/venus/helpers.c
+++ b/drivers/media/platform/qcom/venus/helpers.c
@@ -563,6 +563,8 @@ static u32 to_hfi_raw_fmt(u32 v4l2_fmt)
return HFI_COLOR_FORMAT_NV21;
case V4L2_PIX_FMT_QC8C:
return HFI_COLOR_FORMAT_NV12_UBWC;
+ case V4L2_PIX_FMT_QC10C:
+ return HFI_COLOR_FORMAT_YUV420_TP10_UBWC;
default:
break;
}
diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
index d4cc51fc019c..7ad8cd66b8bc 100644
--- a/drivers/media/platform/qcom/venus/vdec.c
+++ b/drivers/media/platform/qcom/venus/vdec.c
@@ -35,6 +35,10 @@ static const struct venus_format vdec_formats[] = {
.num_planes = 1,
.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
}, {
+ .pixfmt = V4L2_PIX_FMT_QC10C,
+ .num_planes = 1,
+ .type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
+ },{
.pixfmt = V4L2_PIX_FMT_NV12,
.num_planes = 1,
.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,
@@ -1508,7 +1512,7 @@ static const struct hfi_inst_ops vdec_hfi_ops = {
static void vdec_inst_init(struct venus_inst *inst)
{
inst->hfi_codec = HFI_VIDEO_CODEC_H264;
- inst->fmt_out = &vdec_formats[6];
+ inst->fmt_out = &vdec_formats[8];
inst->fmt_cap = &vdec_formats[0];
inst->width = frame_width_min(inst);
inst->height = ALIGN(frame_height_min(inst), 32);
--
2.25.1
next prev parent reply other threads:[~2021-04-29 10:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-29 10:58 [PATCH 0/3] Qualcomm custom compressed pixfmt Stanimir Varbanov
2021-04-29 10:58 ` [PATCH 1/3] v4l: Add Qualcomm custom compressed pixel formats Stanimir Varbanov
2021-04-29 19:10 ` Nicolas Dufresne
2021-05-17 15:13 ` Stanimir Varbanov
2021-06-02 9:56 ` Hans Verkuil
2021-06-02 13:29 ` Stanimir Varbanov
2021-04-29 10:58 ` [PATCH 2/3] venus: Add a handling of QC8C compressed format Stanimir Varbanov
2021-06-02 9:59 ` Hans Verkuil
2021-04-29 10:58 ` Stanimir Varbanov [this message]
2021-06-02 10:01 ` [PATCH 3/3] venus: Add a handling of QC10C " Hans Verkuil
2021-06-02 13:30 ` Stanimir Varbanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210429105815.2790770-4-stanimir.varbanov@linaro.org \
--to=stanimir.varbanov@linaro.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-api@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).