diff options
author | Benjamin Gaignard <benjamin.gaignard@collabora.com> | 2021-07-15 17:12:23 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-09-30 10:07:38 +0200 |
commit | 5523dc7b851849afe53bc4dd747c9709aace515d (patch) | |
tree | 2fa9a64aeb50176b4d5263e832a5c5f2321473ae /drivers/staging/media/hantro/hantro_drv.c | |
parent | 7ba59fb6c3b473dc0c76e87cd493388480c6dd27 (diff) |
media: hantro: Add scaling lists feature
If the bitstream embedded scaling lists allow the driver to use
them for decode the frames.
The scaling lists are expected to be in raster scan order (i.e. not up
right diagonal scan order)
Allocate the memory needed to store lists.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil: add missing @scaling kernel doc description in hantro_hw.h]
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging/media/hantro/hantro_drv.c')
-rw-r--r-- | drivers/staging/media/hantro/hantro_drv.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c index 8a2edd67f2c6..41345b9e54bd 100644 --- a/drivers/staging/media/hantro/hantro_drv.c +++ b/drivers/staging/media/hantro/hantro_drv.c @@ -263,9 +263,6 @@ static int hantro_try_ctrl(struct v4l2_ctrl *ctrl) if (sps->bit_depth_luma_minus8 != 0) /* Only 8-bit is supported */ return -EINVAL; - if (sps->flags & V4L2_HEVC_SPS_FLAG_SCALING_LIST_ENABLED) - /* No scaling support */ - return -EINVAL; } return 0; } @@ -450,6 +447,11 @@ static const struct hantro_ctrl controls[] = { }, { .codec = HANTRO_HEVC_DECODER, .cfg = { + .id = V4L2_CID_MPEG_VIDEO_HEVC_SCALING_MATRIX, + }, + }, { + .codec = HANTRO_HEVC_DECODER, + .cfg = { .id = V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP, .name = "Hantro HEVC slice header skip bytes", .type = V4L2_CTRL_TYPE_INTEGER, |