]> git.baikalelectronics.ru Git - kernel.git/commit
media: rkvdec: Use H264_SCALING_MATRIX only when required
authorEzequiel Garcia <ezequiel@collabora.com>
Tue, 25 Aug 2020 03:52:43 +0000 (05:52 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 1 Sep 2020 12:13:29 +0000 (14:13 +0200)
commit9abf474f937c04c66add0a1988b7bc333366bed1
tree1d9cd91a6ff0e4d945832466bd4532ae8e30c17b
parent39beb2e15ae3ff41aa27717a95b1eeba5615c9d6
media: rkvdec: Use H264_SCALING_MATRIX only when required

Baseline, Main and Extended profiles are specified to
not support a scaling matrix. Also, High profiles
can optionally specify a scaling matrix, using
SPS and PPS NAL units.

To meet this expectation, applications are required to
set the V4L2_CID_MPEG_VIDEO_H264_SCALING_MATRIX control
and set the V4L2_H264_PPS_FLAG_SCALING_MATRIX_PRESENT
flag only when a scaling matrix is specified for a picture.

Implement this on rkvdec, which has hardware support for this
case.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/rkvdec/rkvdec-h264.c
drivers/staging/media/rkvdec/rkvdec.c