diff options
author | Deborah Brouwer <deborah.brouwer@collabora.com> | 2023-07-15 05:16:05 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-08-14 21:27:59 +0300 |
commit | 0f5f12e40824956ed18c1301bed7ac81a33cc70a (patch) | |
tree | b0288035f12b9a122f258759d568c79ce3ccfae3 /drivers/media/pci/bt8xx/bttv-driver.c | |
parent | 87df33be05487a9b4cfab75c7e9818f3c391b5f7 (diff) | |
download | linux-0f5f12e40824956ed18c1301bed7ac81a33cc70a.tar.xz |
media: bttv: remove crop info from bttv_buffer
Instead of storing the cropping parameters in each bttv buffer separately,
just use the global bttv crop because it won't change per buffer.
Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/pci/bt8xx/bttv-driver.c')
-rw-r--r-- | drivers/media/pci/bt8xx/bttv-driver.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c index f32050849691..15825fedb4e0 100644 --- a/drivers/media/pci/bt8xx/bttv-driver.c +++ b/drivers/media/pci/bt8xx/bttv-driver.c @@ -1554,15 +1554,15 @@ static int bttv_prepare_buffer(struct videobuf_queue *q,struct bttv *btv, if (buf->vb.width != width || buf->vb.height != height || buf->vb.field != field || btv->tvnorm != norm || btv->fmt != fmt || - buf->crop.top != c.rect.top || - buf->crop.left != c.rect.left || - buf->crop.width != c.rect.width || - buf->crop.height != c.rect.height) { + btv->crop[!!btv->do_crop].rect.top != c.rect.top || + btv->crop[!!btv->do_crop].rect.left != c.rect.left || + btv->crop[!!btv->do_crop].rect.width != c.rect.width || + btv->crop[!!btv->do_crop].rect.height != c.rect.height) { buf->vb.width = width; buf->vb.height = height; buf->vb.field = field; btv->tvnorm = norm; - buf->crop = c.rect; + btv->crop[!!btv->do_crop].rect = c.rect; redo_dma_risc = 1; } |