lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <da27f648-fca4-42a5-8099-e6e19fa76220@linaro.org>
Date: Thu, 18 Jan 2024 13:34:17 +0000
From: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
To: Sachin Kumar Garg <quic_sachinku@...cinc.com>, hverkuil-cisco@...all.nl,
 Mauro Carvalho Chehab <mchehab@...nel.org>,
 Stanimir Varbanov <stanimir.k.varbanov@...il.com>,
 Vikash Garodia <quic_vgarodia@...cinc.com>, Andy Gross <agross@...nel.org>,
 Bjorn Andersson <andersson@...nel.org>,
 Konrad Dybcio <konrad.dybcio@...aro.org>
Cc: linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH 2/2] media: venus: add new rate control type MBR for
 encoder

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ