mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-18 15:26:08 +07:00
media: staging: rkisp1: cap: support uv swapped planar formats
Planar formats with the u and v planes swapped can be supported by swapping the address of the cb and cr buffers. Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
c6a86569e8
commit
d0dd92789f
@ -738,6 +738,14 @@ static void rkisp1_vb2_buf_queue(struct vb2_buffer *vb)
|
||||
rkisp1_pixfmt_comp_size(pixm, RKISP1_PLANE_CB);
|
||||
}
|
||||
|
||||
/*
|
||||
* uv swap can be supported for planar formats by switching
|
||||
* the address of cb and cr
|
||||
*/
|
||||
if (cap->pix.info->comp_planes == 3 && cap->pix.cfg->uv_swap)
|
||||
swap(ispbuf->buff_addr[RKISP1_PLANE_CR],
|
||||
ispbuf->buff_addr[RKISP1_PLANE_CB]);
|
||||
|
||||
spin_lock_irqsave(&cap->buf.lock, flags);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user