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] [thread-next>] [day] [month] [year] [list]
Message-ID: <5037ca4b0dd0de80750e35ca889d4225@codeaurora.org>
Date:   Thu, 01 Nov 2018 18:40:35 +0530
From:   mgottam@...eaurora.org
To:     Stanimir Varbanov <stanimir.varbanov@...aro.org>
Cc:     hverkuil@...all.nl, mchehab@...nel.org,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-msm@...r.kernel.org, acourbot@...omium.org,
        vgarodia@...eaurora.org
Subject: Re: [PATCH] media: venus: add support for selection rectangles

On 2018-10-16 15:11, Stanimir Varbanov wrote:
> Hi Malathi,
> 
> On 10/09/2018 10:53 AM, Malathi Gottam wrote:
>> Handles target type crop by setting the new active rectangle
>> to hardware. The new rectangle should be within YUV size.
>> 
>> Signed-off-by: Malathi Gottam <mgottam@...eaurora.org>
>> ---
>>  drivers/media/platform/qcom/venus/venc.c | 19 +++++++++++++++++--
>>  1 file changed, 17 insertions(+), 2 deletions(-)
>> 
>> diff --git a/drivers/media/platform/qcom/venus/venc.c 
>> b/drivers/media/platform/qcom/venus/venc.c
>> index 3f50cd0..754c19a 100644
>> --- a/drivers/media/platform/qcom/venus/venc.c
>> +++ b/drivers/media/platform/qcom/venus/venc.c
>> @@ -478,16 +478,31 @@ static int venc_g_fmt(struct file *file, void 
>> *fh, struct v4l2_format *f)
>>  venc_s_selection(struct file *file, void *fh, struct v4l2_selection 
>> *s)
>>  {
>>  	struct venus_inst *inst = to_inst(file);
>> +	int ret;
>> +	u32 buftype;
>> 
>>  	if (s->type != V4L2_BUF_TYPE_VIDEO_OUTPUT)
>>  		return -EINVAL;
>> 
>>  	switch (s->target) {
>>  	case V4L2_SEL_TGT_CROP:
>> -		if (s->r.width != inst->out_width ||
>> -		    s->r.height != inst->out_height ||
>> +		if (s->r.width > inst->out_width ||
>> +		    s->r.height > inst->out_height ||
>>  		    s->r.top != 0 || s->r.left != 0)
>>  			return -EINVAL;
>> +		if (s->r.width != inst->width ||
>> +		    s->r.height != inst->height) {
>> +			buftype = HFI_BUFFER_OUTPUT;
>> +			ret = venus_helper_set_output_resolution(inst,
>> +								 s->r.width,
>> +								 s->r.height,
>> +								 buftype);
> 
> I'm afraid that set_output_resolution cannot be called at any time. Do
> you think we can set it after start_session?

Yes Stan, we can set output_resolution after the session has been 
initialization.
As per the spec, this call s_selection is an optional step under 
Initialization
procedure of encoder even before we request buffers.

So I think setting output resolution in this api shouldn't cause any 
issue once
we are confident on the instance state.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ