Re: [PATCH 2/2] media: vim2m: ensure that width is multiple of two

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Em Tue, 26 Feb 2019 14:36:55 -0300
Mauro Carvalho Chehab <mchehab+samsung@xxxxxxxxxx> escreveu:

> The copy logic assumes that the data width is multiple of two,
> as this is needed in order to support YUYV.

Please ignore this one. The driver already aligns (it enforces
an 8 pixels alignment... 2 pixels should be enough).

> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@xxxxxxxxxx>
> ---
>  drivers/media/platform/vim2m.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/vim2m.c b/drivers/media/platform/vim2m.c
> index ab288e8377f1..89384f324e25 100644
> --- a/drivers/media/platform/vim2m.c
> +++ b/drivers/media/platform/vim2m.c
> @@ -801,7 +801,7 @@ static int vidioc_s_fmt(struct vim2m_ctx *ctx, struct v4l2_format *f)
>  	}
>  
>  	q_data->fmt		= find_format(f);
> -	q_data->width		= f->fmt.pix.width;
> +	q_data->width		= f->fmt.pix.width & (~1);
>  	q_data->height		= f->fmt.pix.height;
>  	q_data->sizeimage	= q_data->width * q_data->height
>  				* q_data->fmt->depth >> 3;



Thanks,
Mauro



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux