Re: [RFC PATCH 1/5] media: videodev2: add V4L2_FMT_FLAG_DYN_RESOLUTION

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

 



Hi Tomasz,
On Mon, Jun 10, 2019 at 5:48 AM Tomasz Figa <tfiga@xxxxxxxxxxxx> wrote:
>
> Hi Maxime,
>
> On Sun, Jun 9, 2019 at 11:38 PM Maxime Jourdan <mjourdan@xxxxxxxxxxxx> wrote:
> >
> > Add a enum_fmt format flag to specifically tag coded formats where
> > dynamic resolution switching is supported by the device.
> >
> > This is useful for some codec drivers that can't support dynamic
> > resolution switching for all their listed coded formats. It allows
> > userspace to know whether it should extract the video parameters itself,
> > or if it can rely on the device to send V4L2_EVENT_SOURCE_CHANGE when
> > such changes are detected.
> >
>
> First of all, thanks for the patch!
>
> Given the aspect of compatibility and also the general preference for
> the drivers to actually handle dynamic resolution changes, I'd suggest
> inverting the meaning of this flag. With something like
> "V4L2_FMT_FLAG_STATIC_RESOLUTION" it would be more of an exception
> rather than the default behavior.
>

This is actually what I did to begin with [0], with the same
reasoning: not supporting dynamic resolution for a certain coded
format is more of an exception than the norm (for decoders).
The patch was ultimately dropped from the meson vdec series after
discussing with Hans, see [0] or the lkml link Hans provided in his
answer.

We have the chance today that stateful decoders in the kernel either
support V4L2_EVENT_SOURCE_CHANGE and dynamic resolution switching for
all their formats, or they don't expose V4L2_EVENT_SOURCE_CHANGE at
all.
While this flag would change the spec, it wouldn't break existing
userspace using close-to-spec drivers like s5p-mfc or mtk-vcodec.

Cheers,
Maxime

[0] https://patchwork.kernel.org/patch/10969829/

> Best regards,
> Tomasz



[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