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]
Message-ID: <f1456b34-9897-41d9-909c-3fac77e17bc3@oss.qualcomm.com>
Date: Thu, 6 Nov 2025 10:44:27 +0800
From: Wangao Wang <wangao.wang@....qualcomm.com>
To: Vikash Garodia <vikash.garodia@....qualcomm.com>,
        Dikshita Agarwal <dikshita.agarwal@....qualcomm.com>,
        Abhinav Kumar <abhinav.kumar@...ux.dev>,
        Bryan O'Donoghue <bod@...nel.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>
Cc: wangao.wang@....qualcomm.com, linux-media@...r.kernel.org,
        linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
        Neil Armstrong <neil.armstrong@...aro.org>, quic_qiweil@...cinc.com,
        quic_renjiang@...cinc.com
Subject: Re: [PATCH v3 1/5] media: qcom: iris: Improve format alignment for
 encoder

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ