mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
media: verisilicon: VP9: Only propose 10 bits compatible pixels formats
When decoding a 10bits bitstreams VP9 driver should only expose 10bits pixel formats. To fulfill this requirement it is needed to call hantro_reset_raw_fmt() when bit depth change and to correctly set match_depth in pixel formats enumeration. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
ac5d3db4c1
commit
3d77e23c99
1 changed files with 8 additions and 3 deletions
|
@ -307,9 +307,14 @@ static int hantro_vp9_s_ctrl(struct v4l2_ctrl *ctrl)
|
|||
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;
|
||||
case V4L2_CID_STATELESS_VP9_FRAME: {
|
||||
int bit_depth = ctrl->p_new.p_vp9_frame->bit_depth;
|
||||
|
||||
if (ctx->bit_depth == bit_depth)
|
||||
return 0;
|
||||
|
||||
return hantro_reset_raw_fmt(ctx, bit_depth);
|
||||
}
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue