mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
media: hantro: Store VP9 bit depth in context
Now that we have proper infrastructure for postprocessing 10-bit formats, store VP9 bit depth in context. Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Tested-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
62d1c353b6
commit
4e8c54fd22
1 changed files with 23 additions and 0 deletions
|
@ -304,6 +304,24 @@ static int hantro_jpeg_s_ctrl(struct v4l2_ctrl *ctrl)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int hantro_vp9_s_ctrl(struct v4l2_ctrl *ctrl)
|
||||
{
|
||||
struct hantro_ctx *ctx;
|
||||
|
||||
ctx = container_of(ctrl->handler,
|
||||
struct hantro_ctx, ctrl_handler);
|
||||
|
||||
switch (ctrl->id) {
|
||||
case V4L2_CID_STATELESS_VP9_FRAME:
|
||||
ctx->bit_depth = ctrl->p_new.p_vp9_frame->bit_depth;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct v4l2_ctrl_ops hantro_ctrl_ops = {
|
||||
.try_ctrl = hantro_try_ctrl,
|
||||
};
|
||||
|
@ -312,6 +330,10 @@ static const struct v4l2_ctrl_ops hantro_jpeg_ctrl_ops = {
|
|||
.s_ctrl = hantro_jpeg_s_ctrl,
|
||||
};
|
||||
|
||||
static const struct v4l2_ctrl_ops hantro_vp9_ctrl_ops = {
|
||||
.s_ctrl = hantro_vp9_s_ctrl,
|
||||
};
|
||||
|
||||
#define HANTRO_JPEG_ACTIVE_MARKERS (V4L2_JPEG_ACTIVE_MARKER_APP0 | \
|
||||
V4L2_JPEG_ACTIVE_MARKER_COM | \
|
||||
V4L2_JPEG_ACTIVE_MARKER_DQT | \
|
||||
|
@ -467,6 +489,7 @@ static const struct hantro_ctrl controls[] = {
|
|||
.codec = HANTRO_VP9_DECODER,
|
||||
.cfg = {
|
||||
.id = V4L2_CID_STATELESS_VP9_FRAME,
|
||||
.ops = &hantro_vp9_ctrl_ops,
|
||||
},
|
||||
}, {
|
||||
.codec = HANTRO_VP9_DECODER,
|
||||
|
|
Loading…
Reference in a new issue