From: Wangao Wang <wangao.wang@oss.qualcomm.com>
To: Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Bryan O'Donoghue <bod@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: wangao.wang@oss.qualcomm.com, linux-media@vger.kernel.org,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
Neil Armstrong <neil.armstrong@linaro.org>,
quic_qiweil@quicinc.com, quic_renjiang@quicinc.com
Subject: Re: [PATCH v3 1/5] media: qcom: iris: Improve format alignment for encoder
Date: Thu, 6 Nov 2025 10:44:27 +0800 [thread overview]
Message-ID: <f1456b34-9897-41d9-909c-3fac77e17bc3@oss.qualcomm.com> (raw)
In-Reply-To: <d21b6376-3b20-4171-9037-a6faf4e438a1@oss.qualcomm.com>
On 2025/11/5 20:29, Vikash Garodia wrote:
>> @@ -231,10 +233,19 @@ static int iris_hfi_gen2_set_crop_offsets(struct iris_inst *inst, u32 plane)
>> top_offset = inst->compose.top;
>> }
>> } else {
>> - bottom_offset = (inst->fmt_src->fmt.pix_mp.height - inst->crop.height);
>> - right_offset = (inst->fmt_src->fmt.pix_mp.width - inst->crop.width);
>> - left_offset = inst->crop.left;
>> - top_offset = inst->crop.top;
>> + if (V4L2_TYPE_IS_OUTPUT(plane)) {
>> + bottom_offset = (inst->enc_raw_height - inst->crop.height);
>> + right_offset = (inst->enc_raw_width - inst->crop.width);
>> + left_offset = inst->crop.left;
>> + top_offset = inst->crop.top;
>> + } else {
>> + bottom_offset = (ALIGN(inst->enc_raw_height, codec_align) -
>> + inst->enc_raw_height);
>> + right_offset = (ALIGN(inst->enc_raw_width, codec_align) -
>> + inst->enc_raw_width);
>
> For capture plane, offset can be calculated from inst->fmt_dst-
> >fmt.pix_mp.width - inst->enc_raw_width.
>
> This is to ensure that it is consistent with what we do while setting in
> iris_hfi_gen2_set_bitstream_resolution.
>
For downscale case, enc_raw_width > fmt_dst->fmt.pix_mp.width, the
offset becomes negative, so I think it should be kept this way.
--
Best Regards,
Wangao
next prev parent reply other threads:[~2025-11-06 2:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 8:11 [PATCH v3 0/5] media: qcom: iris: encoder feature enhancements Wangao Wang
2025-11-04 8:11 ` [PATCH v3 1/5] media: qcom: iris: Improve format alignment for encoder Wangao Wang
2025-11-04 10:39 ` Bryan O'Donoghue
2025-11-05 2:57 ` Wangao Wang
[not found] ` <d21b6376-3b20-4171-9037-a6faf4e438a1@oss.qualcomm.com>
2025-11-06 2:44 ` Wangao Wang [this message]
2025-11-04 8:11 ` [PATCH v3 2/5] media: qcom: iris: Add scale support " Wangao Wang
2025-11-04 8:11 ` [PATCH v3 3/5] media: qcom: iris: Add rotation " Wangao Wang
2025-11-04 8:11 ` [PATCH v3 4/5] media: qcom: iris: Add flip " Wangao Wang
2025-11-04 8:11 ` [PATCH v3 5/5] media: qcom: iris: Add intra refresh " Wangao Wang
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=f1456b34-9897-41d9-909c-3fac77e17bc3@oss.qualcomm.com \
--to=wangao.wang@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=bod@kernel.org \
--cc=dikshita.agarwal@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_qiweil@quicinc.com \
--cc=quic_renjiang@quicinc.com \
--cc=vikash.garodia@oss.qualcomm.com \
/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
all inboxes | Powered by JetHome®