From: Philipp Zabel Date: Fri, 11 Jul 2014 09:36:14 +0000 (-0300) Subject: [media] coda: fix h.264 quantization parameter range X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=594a750b37efb21a6967851fd19b6a9b6aca2c48;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [media] coda: fix h.264 quantization parameter range If bitrate is not set, the encoder is running in VBR mode, with the I- and P-frame quantization parameters configured from userspace. For the quantization parameters, 0 is a valid value. Signed-off-by: Philipp Zabel Signed-off-by: Kamil Debski Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index 6c9d18c28b3b..d7778015575c 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -2383,9 +2383,9 @@ static int coda_ctrls_setup(struct coda_ctx *ctx) v4l2_ctrl_new_std(&ctx->ctrls, &coda_ctrl_ops, V4L2_CID_MPEG_VIDEO_GOP_SIZE, 1, 60, 1, 16); v4l2_ctrl_new_std(&ctx->ctrls, &coda_ctrl_ops, - V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP, 1, 51, 1, 25); + V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP, 0, 51, 1, 25); v4l2_ctrl_new_std(&ctx->ctrls, &coda_ctrl_ops, - V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP, 1, 51, 1, 25); + V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP, 0, 51, 1, 25); v4l2_ctrl_new_std(&ctx->ctrls, &coda_ctrl_ops, V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP, 1, 31, 1, 2); v4l2_ctrl_new_std(&ctx->ctrls, &coda_ctrl_ops,