media: cedrus: h264: Optimize mv col buffer allocation
authorJernej Skrabec <jernej.skrabec@gmail.com>
Wed, 19 Oct 2022 17:45:51 +0000 (19:45 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 24 Oct 2022 17:03:54 +0000 (19:03 +0200)
commitfec94f8c9954c31364e96af783c497d782730334
tree090680d80a0ac772f80d0f02a2123d4d77dbab19
parent0ee952c2f484ee0059f7ce4951aaa3cb0eda96dd
media: cedrus: h264: Optimize mv col buffer allocation

Currently allocation for mv col buffer pool is very wasteful. It
allocates memory for worst case which is a lot more than it's needed for
typical use. Fix that by replacing pool with individual allocations when
such buffer is really needed. At that time all needed information for
determining optimal mv col buffer size is also known.

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_h264.c