Re: [PATCH v2 2/2] media: coda: Add more H264 levels for CODA960

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

 



Hi Philipp,

On Wed, Mar 9, 2022 at 1:29 PM Philipp Zabel <p.zabel@xxxxxxxxxxxxxx> wrote:

> Looking at my notes, I've never seen the encoder produce streams with
> levels 1.1, 1.2, 1.3, 2.1, 2.2, or 4.1. Has anybody else?

On my tests, I only saw 3.1 and 3.2 levels.

> Level 4.2 streams can be produced though, just not at realtime speeds.
>
> Also, this encoder control change has no effect unless max is changed
> as well. I think it should look as follows:
>
>         if (ctx->dev->devtype->product == CODA_960) {
>                 v4l2_ctrl_new_std_menu(&ctx->ctrls, &coda_ctrl_ops,
>                         V4L2_CID_MPEG_VIDEO_H264_LEVEL,
> -                       V4L2_MPEG_VIDEO_H264_LEVEL_4_0,
> -                       ~((1 << V4L2_MPEG_VIDEO_H264_LEVEL_2_0) |
> +                       V4L2_MPEG_VIDEO_H264_LEVEL_4_2,
> +                       ~((1 << V4L2_MPEG_VIDEO_H264_LEVEL_1_0) |
> +                         (1 << V4L2_MPEG_VIDEO_H264_LEVEL_2_0) |
>                           (1 << V4L2_MPEG_VIDEO_H264_LEVEL_3_0) |
>                           (1 << V4L2_MPEG_VIDEO_H264_LEVEL_3_1) |
>                           (1 << V4L2_MPEG_VIDEO_H264_LEVEL_3_2) |
> -                         (1 << V4L2_MPEG_VIDEO_H264_LEVEL_4_0)),
> +                         (1 << V4L2_MPEG_VIDEO_H264_LEVEL_4_0) |
> +                         (1 << V4L2_MPEG_VIDEO_H264_LEVEL_4_2)),
>                         V4L2_MPEG_VIDEO_H264_LEVEL_4_0);
>         }
>         v4l2_ctrl_new_std(&ctx->ctrls, &coda_ctrl_ops,

You are right.

With Nicolas' original patch I see the following levels being reported:

h264_level 0x00990a67 (menu)   : min=0 max=11 default=11 value=11
5: 2
8: 3
9: 3.1
10: 3.2
11: 4

With your proposal I get:

 h264_level 0x00990a67 (menu)   : min=0 max=13 default=11 value=11
0: 1
5: 2
8: 3
9: 3.1
10: 3.2
11: 4
13: 4.2

I will submit a v3 with your proposal.

Thanks



[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