Re: Venus v4l2-compliance failures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17/02/2022 15:12, Stanimir Varbanov wrote:
> Hi Hans,
> 
> Presently we have two failures while running v4l2-compliance on venus
> stateful decoder:
> 
> 1. fail: v4l2-compliance.cpp(753): !ok
>         test for unlimited opens: FAIL
> 
> 2. fail: v4l2-test-formats.cpp(1668): IS_DECODER(node)
>         test Cropping: FAIL
>    fail: v4l2-test-codecs.cpp(104): node->function !=
> MEDIA_ENT_F_PROC_VIDEO_DECODER
>         test VIDIOC_(TRY_)DECODER_CMD: FAIL
> 
> Failure #1 is related to the limitation we made in decoder open(). The
> maximum parallel decoding sessions is limited to 16 and the check
> for this maximum is made in decoder open() because the clients wanted to
> know that earlier. For example, Chromium browser can open 16 hw
> accelerated decoder sessions (in separate Tabs) and from 17 and upward
> it will fallback to sw decoder. I wonder how that failure can be fixed.

I'm wondering if this isn't better done via a read-only control that
reports the max number of parallel sessions.

I really hate artificial open() limitations, it's very much against the
v4l2 philosophy.

Reporting it with a standard control makes it also much easier for software
to anticipate when it needs to switch to SW en/decoding.

> 
> 
> Failure #2 is related to a commit [1] which add checks for
> MEDIA_ENT_F_PROC_VIDEO_ENCODER, I think this entity flag is applicable
> for stateless encoders (Request API) but Venus driver has no use of
> media-controller API. Did I miss something?

For item 2, can you try the patch below?

Regards,

	Hans

-----------------------------------------------------------------------

Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
---
diff --git a/utils/v4l2-compliance/v4l2-test-codecs.cpp b/utils/v4l2-compliance/v4l2-test-codecs.cpp
index 22175eef..3f06070f 100644
--- a/utils/v4l2-compliance/v4l2-test-codecs.cpp
+++ b/utils/v4l2-compliance/v4l2-test-codecs.cpp
@@ -29,9 +29,10 @@ int testEncoder(struct node *node)
 {
 	struct v4l2_encoder_cmd cmd;
 	bool is_encoder = node->codec_mask & (STATEFUL_ENCODER | JPEG_ENCODER);
+	bool is_stateless_encoder = node->codec_mask & STATELESS_ENCODER;
 	int ret;

-	if (IS_ENCODER(node))
+	if (is_stateless_encoder)
 		fail_on_test(node->function != MEDIA_ENT_F_PROC_VIDEO_ENCODER);
 	memset(&cmd, 0xff, sizeof(cmd));
 	memset(&cmd.raw, 0, sizeof(cmd.raw));
@@ -98,9 +99,10 @@ int testDecoder(struct node *node)
 {
 	struct v4l2_decoder_cmd cmd;
 	bool is_decoder = node->codec_mask & (STATEFUL_DECODER | JPEG_DECODER);
+	bool is_stateless_decoder = node->codec_mask & STATELESS_DECODER;
 	int ret;

-	if (IS_DECODER(node))
+	if (is_stateless_decoder)
 		fail_on_test(node->function != MEDIA_ENT_F_PROC_VIDEO_DECODER);
 	memset(&cmd, 0xff, sizeof(cmd));
 	memset(&cmd.raw, 0, sizeof(cmd.raw));



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux