From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: Sachin Kumar Garg <quic_sachinku@quicinc.com>,
hverkuil-cisco@xs4all.nl,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Stanimir Varbanov <stanimir.k.varbanov@gmail.com>,
Vikash Garodia <quic_vgarodia@quicinc.com>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH 2/2] media: venus: add new rate control type MBR for encoder
Date: Thu, 18 Jan 2024 13:34:17 +0000 [thread overview]
Message-ID: <da27f648-fca4-42a5-8099-e6e19fa76220@linaro.org> (raw)
In-Reply-To: <20240118105934.137919-3-quic_sachinku@quicinc.com>
On 18/01/2024 10:59, Sachin Kumar Garg wrote:
>
> - switch (*in) {
> - case HFI_RATE_CONTROL_OFF:
> - case HFI_RATE_CONTROL_CBR_CFR:
> - case HFI_RATE_CONTROL_CBR_VFR:
> - case HFI_RATE_CONTROL_VBR_CFR:
> - case HFI_RATE_CONTROL_VBR_VFR:
> - case HFI_RATE_CONTROL_CQ:
> - break;
> - default:
> - ret = -EINVAL;
> - break;
> + if (hfi_ver == HFI_VERSION_4XX) {
> + switch (*in) {
> + case HFI_RATE_CONTROL_OFF:
> + case HFI_RATE_CONTROL_CBR_CFR:
> + case HFI_RATE_CONTROL_CBR_VFR:
> + case HFI_RATE_CONTROL_VBR_CFR:
> + case HFI_RATE_CONTROL_VBR_VFR:
> + case HFI_RATE_CONTROL_CQ:
> + case HFI_RATE_CONTROL_MBR_CFR:
> + break;
> + default:
> + ret = -EINVAL;
> + break;
> + }
> + } else {
> + switch (*in) {
> + case HFI_RATE_CONTROL_OFF:
> + case HFI_RATE_CONTROL_CBR_CFR:
> + case HFI_RATE_CONTROL_CBR_VFR:
> + case HFI_RATE_CONTROL_VBR_CFR:
> + case HFI_RATE_CONTROL_VBR_VFR:
> + case HFI_RATE_CONTROL_CQ:
> + break;
> + default:
> + ret = -EINVAL;
> + break;
> + }
The if/else you have here seems like a needless replication
Just have =>
case HFI_RATE_CONTROL_MBR_CFR:
if (hfi_ver == HFI_VERSION_4XX)
---
bod
next prev parent reply other threads:[~2024-01-18 13:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-18 10:59 [PATCH 0/2] add MBR type rate control " Sachin Kumar Garg
2024-01-18 10:59 ` [PATCH 1/2] media: v4l2-ctrls: add encoder maximum bitrate control Sachin Kumar Garg
2024-01-18 10:59 ` [PATCH 2/2] media: venus: add new rate control type MBR for encoder Sachin Kumar Garg
2024-01-18 13:34 ` Bryan O'Donoghue [this message]
2024-01-18 17:44 ` Konrad Dybcio
2024-01-19 8:05 ` Vikash Garodia
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=da27f648-fca4-42a5-8099-e6e19fa76220@linaro.org \
--to=bryan.odonoghue@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=quic_sachinku@quicinc.com \
--cc=quic_vgarodia@quicinc.com \
--cc=stanimir.k.varbanov@gmail.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®