media: cedrus: h265: Associate mv col buffers with buffer
authorJernej Skrabec <jernej.skrabec@gmail.com>
Wed, 19 Oct 2022 17:45:50 +0000 (19:45 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 24 Oct 2022 17:03:54 +0000 (19:03 +0200)
commit0ee952c2f484ee0059f7ce4951aaa3cb0eda96dd
tree4897d07223c76aa50e378c973a5828fe10035bb8
parentd555409dd1b7cc9e7e5b9e2924c0ef4bf23f6c9b
media: cedrus: h265: Associate mv col buffers with buffer

Currently mv col aux buffers are allocated as a pool. This is not
optimal because pool size equals number of buffers before stream is
started. Buffers can easily be allocated afterwards. In such cases,
invalid pointer is assigned to the decoding frame and Cedrus might
overwrite memory location which is allocated to different task.

Solve this issue with allocating mv col buffer once capture buffer is
actually used.

Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/staging/media/sunxi/cedrus/cedrus.h
drivers/staging/media/sunxi/cedrus/cedrus_h265.c