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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 26 May 2023 01:12:43 +0300
From:   Stanimir Varbanov <stanimir.k.varbanov@...il.com>
To:     Konrad Dybcio <konrad.dybcio@...aro.org>,
        Dikshita Agarwal <quic_dikshita@...cinc.com>,
        linux-media@...r.kernel.org, quic_vgarodia@...cinc.com,
        agross@...nel.org, andersson@...nel.org, mchehab@...nel.org
Cc:     linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH] venus: replace arrary index with enum for supported
 formats

Hi Konrad,

On 23.05.23 г. 11:02 ч., Konrad Dybcio wrote:
> 
> 
> On 22.05.2023 08:17, Dikshita Agarwal wrote:
>> Use enums to list supported formats for encoder and decoder
>> instead of array index which was a error prone design.
>>
>> Signed-off-by: Dikshita Agarwal <quic_dikshita@...cinc.com>
>> ---
> Thanks a lot.
> 
> Reviewed-by: Konrad Dybcio <konrad.dybcio@...aro.org>
> 
>>   drivers/media/platform/qcom/venus/core.h | 16 ++++++++
>>   drivers/media/platform/qcom/venus/vdec.c | 63 +++++++++++++++++++-------------
>>   drivers/media/platform/qcom/venus/venc.c | 31 +++++++++-------
>>   3 files changed, 72 insertions(+), 38 deletions(-)
>>
>> diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h
>> index 12a42fb..e988ed4 100644
>> --- a/drivers/media/platform/qcom/venus/core.h
>> +++ b/drivers/media/platform/qcom/venus/core.h
>> @@ -83,6 +83,22 @@ struct venus_resources {
>>   	const char *fwname;
>>   };
>>   
>> +enum venus_fmt {
>> +	VENUS_FMT_NV12			= 0,
>> +	VENUS_FMT_QC08C			= 1,
>> +	VENUS_FMT_QC10C			= 2,
>> +	VENUS_FMT_H264			= 3,
>> +	VENUS_FMT_VP8			= 4,
>> +	VENUS_FMT_VP9			= 5,
>> +	VENUS_FMT_HEVC			= 6,
>> +	VENUS_FMT_VC1_ANNEX_G		= 7,
>> +	VENUS_FMT_VC1_ANNEX_L		= 8,
>> +	VENUS_FMT_MPEG4			= 9,
>> +	VENUS_FMT_MPEG2			= 10,
>> +	VENUS_FMT_H263			= 11,
>> +	VENUS_FMT_XVID			= 12,
> Nit: I don't think the '= n' is necessary here, as it doesn't
> map to anything in hw/fw (or does it?)

IMO, the numbers could help when debugging to avoid counting.

> 
> Konrad
-- 
regards,
Stan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ