Skip to content

Commit

Permalink
CHROMIUM: virtio_video_enc: Use reasonable max for V4L2_CID_MPEG_VIDE…
Browse files Browse the repository at this point in the history
…O_BITRATE.

Upon initialization the encode device requests the bitrate from the
underlying encoder and uses that as both the default and maximum value.
This prevents us from configuring bitrates higher than the initial
value, so this CL changes the maximum value to 1GBs instead.

Signed-off-by: David Staessens <dstaessens@google.com>

BUG=b:162799179
TEST=tast run DUT arc.VideoEncodeAccel.h264_192p_i420_vm

Change-Id: If015de58c02564dc49ba1dc8d1c5a0bff1299630
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2522932
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: David Staessens <dstaessens@chromium.org>
Tested-by: David Staessens <dstaessens@chromium.org>
  • Loading branch information
David Staessens authored and Commit Bot committed Nov 9, 2020
1 parent b6cc419 commit 675b572
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/media/virtio/virtio_video_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ int virtio_video_enc_init_ctrls(struct virtio_video_stream *stream)
v4l2_ctrl_new_std(&stream->ctrl_handler,
&virtio_video_enc_ctrl_ops,
V4L2_CID_MPEG_VIDEO_BITRATE,
1, stream->control.bitrate,
// Set max to 1GBs to cover most use cases.
1, 1000000000,
1, stream->control.bitrate);
}

Expand Down

0 comments on commit 675b572

Please sign in to comment.